home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / arexx / rxtrk386.lha / RexxTricks / Docs / English / rexxtricks.doc next >
Text File  |  1996-04-20  |  114KB  |  3,567 lines

  1.  
  2.  
  3. ##########################################################################
  4.  
  5.                     'rexxtricks.library' 38.6 (12.4.96)
  6.  
  7.    Copyright (C) 1994,95 Jürgen Kohrmeyer, <J_Kohrmeyer@wilam.north.de>
  8.  
  9. ##########################################################################
  10.  
  11.    'rexxtricks.library' is an ARexx function library. The functions cannot
  12. be assigned to a special purpose, it's just a collection of functions I
  13. missed when programming with ARexx. Let me know if you have any ideas for
  14. other useful functions.
  15.  
  16. * Copyright                   Copyright notice
  17. * History                     History of rexxtricks.library
  18. * Credits                     Thankls must go to...
  19. * Author                      Where to send comments, bug reports etc.
  20. * Requirements                68040, 18MB Ram ;-)
  21. * Installation                How to install rexxtricks.library
  22. * Library functions           Summary of all functions
  23. * The VIEWLIST() window       How to use the 'VIEWLIST' window
  24. * Index                       Index for this document
  25.  
  26. Copyright notice
  27. ****************
  28.  
  29.    'rexxtricks.library' is FREEWARE, but still Copyright by Jürgen
  30. Kohrmeyer.  The archive may be freely distributed for non-commercial
  31. purposes, as long as all files are present and have not been modified. The
  32. archive may be uploaded to any bulletin board systems or FTP servers. You
  33. can include the archive on Public Domain disks if you don't ask for more
  34. than a fee of US $3 or 3 DM. This limit applies especially to German
  35. Public-Domain dealers! It's allowed to include the archive on a CD-ROM if
  36. the price of the CD is not more than US $30 or 30 DM.
  37.  
  38.    All files in this archive are provided "as is" without warranty of any
  39. kind, either expressed or implied. The user assumes all risks and
  40. responsibilities related to its use. The author cannot be made liable for
  41. any damage resulting from the use of 'rexxtricks.library' and the other
  42. files in this archive.
  43.  
  44.  
  45. Programs which are included in the archive:
  46. ------------------------------------------
  47. The ARexx program 'FindGUI' uses the program 'Find'.
  48. 'FindGUI' is Copyright (C) by Nils Görs.
  49. 'Find' is Copyright (C) by Ralph Seichter.
  50.  
  51. The Arexx program 'RDBBackup' uses the program 'ReadRDB'.
  52. 'ReadRDB' is Copyright (C) by Gérard Cornu.
  53.  
  54. 'FindGUI' and 'RDBBackup' use the 'triton.library'.
  55. The 'triton.library' is Copyright (C) by Stefan Zeiger.
  56.  
  57.  
  58. Programs which are not included in the archive:
  59. ----------------------------------------------
  60. The functions 'WHATIS' and 'WHATISTYPES' use the 'whatis.library'. The
  61. 'whatis.library' is Copyright (C) by Sylvain Rougier und Pierre Carrette.
  62.  
  63. The functions 'FILEID_IDENTIFY', 'FILEID_GETHIGHID', 'FILEID_GETIDSTRING'
  64. and 'FILEID_GETTYPES' use the 'FileID.library'. The 'FileID.library' is
  65. Copyright (C) by Oliver Lange.
  66.  
  67. The function 'CRC32' uses the 32 bit CRC-Table, which is also used by
  68. the ZModem file transfer protocol. This table is Copyright (C) by Gary
  69. S. Brown. The source of the function 'CRC32' is taken from the program
  70. 'crc32', which is Copyright (C) by Stephen Satchell, Satchell Evaluations
  71. and Chuck Forsberg, Omen Technology.
  72.  
  73. Changes since version 38.4
  74. **************************
  75.  
  76. V38.5
  77.         * New function 'READLINES'
  78.  
  79.         * New function 'WRITELINES'
  80.  
  81.         * New function 'STEMCOPY'
  82.  
  83.         * New function 'STEMREMOVE'
  84.  
  85.         * New function 'RAND'
  86.  
  87.         * New function 'READCLIPBOARD'
  88.  
  89.         * New function 'WRITECLIPBOARD'
  90.  
  91.         * New function 'SCSI_MANUFACTURER'
  92.  
  93.         * New function 'SCSI_PRODUCT'
  94.  
  95.         * New function 'SCSI_REVISION'
  96.  
  97.         * New function 'SCSI_DEVICETYPE'
  98.  
  99.         * New function 'SCSI_TESTREADY'
  100.  
  101. V38.6
  102.         * English documentation
  103.  
  104.         * Fixed a bug in the function 'VIEWLIST', MouseBlankers didn't work
  105.           if the window was active
  106.  
  107.         * New options for function 'QSORT'
  108.  
  109.         * From now on the function 'SEARCHPATTERN' stores the found line in
  110.           the ARexx variable 'RESULT'
  111.  
  112.         * New function 'FILEID_IDENTIFY'
  113.  
  114.         * New function 'FILEID_GETHIGHID'
  115.  
  116.         * New function 'FILEID_GETIDSTRING'
  117.  
  118.         * New function 'FILEID_GETTYPES'
  119.  
  120.         * New function 'UUDECODE'
  121.  
  122.         * New function 'UUENCODE'
  123.  
  124.         * New function 'STEMINSERT'
  125.  
  126.         * New function 'GETDIR'
  127.  
  128. Credits
  129. *******
  130.  
  131. Thanks must go to:
  132.  
  133. "Gérard Cornu" for his excellent program 'ReadRDB'.
  134.  
  135. "Hermann 'Uso' Doerries" for his great work and 'Wilam', the best mailbox
  136. and newsserver. :-)
  137.  
  138. "Nils Görs" for 'FindGUI' and all the other scripts, ideas,
  139. bug reports, beta testing ...
  140.  
  141. "Ralph Seichter" for his excellent program 'Find'.
  142.  
  143. "Stefan Zeiger" for 'Triton', one of the best GUI-Layout systems.
  144.  
  145. All other people, who send me suggestions or bug reports.
  146.  
  147. Author
  148. ******
  149.  
  150.    You can reach the author at the following addresses, please use e-mail
  151. if possible:
  152.  
  153. Mail:
  154.           Jürgen Kohrmeyer
  155.           Oststraße 2
  156.           49143 Bissendorf
  157.           
  158.           GERMANY
  159.  
  160. Voice:
  161.           +49-5402-5195
  162.  
  163. E-Mail:
  164.           j_kohrmeyer@wilam.north.de
  165.  
  166. Support-Mailbox:
  167.           WILAM Mailboxsystem Wildeshausen
  168.           
  169.           Port 1 - +49-4431-92081 : USR DualStandard V.34
  170.           Port 2 - +49-4431-92082 : ZyXel 19.2k
  171.           Port 3 - +49-4431-92082 : ISDN X.75
  172.           
  173.           Login with username MD, download from menu
  174.  
  175. Requirements
  176. ************
  177.  
  178.    The 'rexxtricks.library' requires Kickstart and Workbench 2.04. Before
  179. using the library, you must start the ARexx-Interpreter RexxMast.
  180.  
  181.    The functions 'WHATIS()' and 'WHATISTYPES()' require 'whatis.library'
  182. V4.0+ in your LIBS: directory.
  183.  
  184.    You can get 'whatis.library' from many BBS systems, version 4.0 of the
  185. library can be found on Fred Fish's 'AmigaLibDisk 995'.
  186.  
  187.    The 'FILEID_xx()' functions require 'FileID.library' V7.0+ in your
  188. LIBS: directory.
  189.  
  190.    'FileID.library' V7.0 can be found on the 'Meeting Pearls Vol. III'
  191. CD-ROM.
  192.  
  193. Installation
  194. ************
  195.  
  196.    Installation is easy, just copy 'rexxtricks.library' to LIBS:.
  197. Deutsch is the builtin language of 'rexxtricks.library', if you want to use
  198. an other language copy the file rexxtricks.catalog of the language to
  199. LOCALE:catalogs. Only english is supported at this time.
  200.  
  201.    To use 'rexxtricks.library' and ARexx, you have to start the ARexx
  202. interpreter first. If this isn't installed in your system, add the
  203. following line to S:User-Startup:
  204.  
  205.      SYS:System/RexxMast >NIL:
  206.  
  207. Functions of 'rexxtricks.library' 38.6 (12.4.96)
  208. ************************************************
  209.  
  210. AmigaDOS-functions
  211.  
  212. * GETENV()                 Get environment variable
  213. * SETENV()                 Set environment variable
  214. * UNSETENV()               Remove environment variable
  215.  
  216. * PATHPART()               Extract dirname from path
  217. * FILEPART()               Extract filename from path
  218. * MAKEPATH()               Append a filename to the end of a path
  219.  
  220. * SUFFIXPART()             Get suffix of a filename
  221. * MAKESUFFIX()             Append a suffix to the end of a filename
  222.  
  223. * GETCOMMENT()             Get comment of a file
  224. * SETCOMMENT()             Set comment of a file
  225.  
  226. * GETPROTECTION()          Get protection flags of a file
  227. * SETPROTECTION()          Set protection flags of a file
  228.  
  229. * MATCHPATTERN()           Check a string for pattern
  230. * SEARCHPATTERN()          Search for pattern in a textfile
  231.  
  232. * GETKEY()                 Wait for a key at console window
  233.  
  234. * GETDIR()                 Read directory into a compound variable
  235.  
  236. * READFILE()               Read a textfile into a compound variable
  237. * WRITEFILE()              Write contents of a compound variable to a textfile
  238. * READLINES()              Read a part of a textfile into a compound variable
  239. * WRITELINES()             Replace or insert lines in a textfile
  240.  
  241.  
  242. SCSI-functions
  243.  
  244. * SCSI_DEVICETYPE()        Get type of a SCSI-Device, DISK, TAPE etc.
  245. * SCSI_MANUFACTURER()      Get manufacturer of a SCSI-Device
  246. * SCSI_PRODUCT()           Get product-string of a SCSI-Device
  247. * SCSI_REVISION()          Get revision-string of a SCSI-Device
  248. * SCSI_TESTREADY()         Test whether a SCSI-Device is ready or not
  249.  
  250.  
  251. Clipboard-functions
  252.  
  253. * READCLIPBOARD()          Read text from clipboard
  254. * WRITECLIPBOARD()         Write text to clipboard
  255.  
  256.  
  257. List-functions
  258.  
  259. * QSORT()                  Sort list with QuickSort
  260. * BSEARCH()                Search string with Binary Search
  261. * LSEARCH()                Search string with Linear Search
  262.  
  263. * STEMCOPY()               Copy elements of a compound variable
  264. * STEMINSERT()             Insert elements in a compound variable
  265. * STEMREMOVE()             Remove elements of a compound variable
  266.  
  267. * VIEWLIST()               Display list in a listview-window
  268.  
  269.  
  270. Publicscreen-functions
  271.  
  272. * GETDEFAULTPUBSCREEN()    Get name of the default-pubcreen
  273. * SETDEFAULTPUBSCREEN()    Set new default pubscreen
  274.  
  275. * GETPUBSCREENMODES()      Get current pubscreen modes
  276. * SETPUBSCREENMODES()      Set new pubscreen modes
  277.  
  278. * PUBSCREENTOFRONT()       Move a pubscreen to the front
  279. * PUBSCREENTOBACK()        Move a pubscreen to the back
  280.  
  281. * PUBSCREENLIST()          Get list of all pubscreens currently open
  282.  
  283. * BEEP()                   Beep screens
  284.  
  285.  
  286. Icon-functions
  287.  
  288. * GETTOOLTYPEVALUE()       Get the value of a tooltype
  289. * SETTOOLTYPEVALUE()       Set the value of a tooltype
  290.  
  291. * GETTOOLTYPES()           Get all tooltypes of an icon
  292. * SETTOOLTYPES()           Set all tooltypes of an icon
  293.  
  294. * GETDEFAULTTOOL()         Get default tool of an icon
  295. * SETDEFAULTTOOL()         Set default tool of an icon
  296.  
  297. * GETSTACK()               Get the stacksize of an icon
  298. * SETSTACK()               Set the stacksize of an icon
  299.  
  300. * CREATEICON()             Create a new Icon
  301. * WBINFO()                 Call the icon information window from workbench (OS3.0+)
  302.  
  303.  
  304. Misc functions
  305.  
  306. * WHATIS()                 Get filetype, uses 'whatis.library V4.0+'
  307. * WHATISTYPES()            Get a list of all currently known filetypes
  308.  
  309. * FILEID_IDENTIFY()        Get filetype, uses 'FileID.library'
  310. * FILEID_GETHIGHID()       Get maximum filetype-ID of 'FileID.library'
  311. * FILEID_GETIDSTRING()     Get the description of a filtype-ID
  312. * FILEID_GETTYPES()        Get a list of all currently known filetypes
  313.  
  314. * UUDECODE()               uudecode a file
  315. * UUENCODE()               uuencode a file
  316.  
  317. * CRC32()                  Calculate 32-Bit CRC checksum of a file
  318.  
  319. * COUNTCHARS()             Count chars in a string
  320.  
  321. * RAND()                   Get a random number
  322.  
  323. * REXXTRICKSVERSION()      Get version of rexxtricks.library
  324.  
  325.  
  326. All functions in alphabetical order
  327.  
  328. * BEEP()                   Beep screens
  329. * BSEARCH()                Search string with Binary Search
  330. * COUNTCHARS()             Count chars in a string
  331. * CRC32()                  Calculate 32-Bit CRC checksum of a file
  332. * CREATEICON()             Create a new Icon
  333. * FILEID_GETHIGHID()       Get maximum filetype-ID of 'FileID.library'
  334. * FILEID_GETIDSTRING()     Get the description of a filtype-ID
  335. * FILEID_GETTYPES()        Get a list of all currently known filetypes
  336. * FILEID_IDENTIFY()        Get filetype, uses 'FileID.library'
  337. * FILEPART()               Extract filename from path
  338. * GETCOMMENT()             Get comment of a file
  339. * GETDEFAULTPUBSCREEN()    Get name of the default-pubcreen
  340. * GETDEFAULTTOOL()         Get default tool of an icon
  341. * GETDIR()                 Read directory into a compound variable
  342. * GETENV()                 Get environment variable
  343. * GETKEY()                 Wait for a key at console window
  344. * GETPROTECTION()          Get protection flags of a file
  345. * GETPUBSCREENMODES()      Get current pubscreen modes
  346. * GETSTACK()               Get the stacksize of an icon
  347. * GETTOOLTYPES()           Get all tooltypes of an icon
  348. * GETTOOLTYPEVALUE()       Get the value of a tooltype
  349. * LSEARCH()                Search string with Linear Search
  350. * MAKEPATH()               Append a filename to the end of a path
  351. * MAKESUFFIX()             Append a suffix to the end of a filename
  352. * MATCHPATTERN()           Check a string for pattern
  353. * PATHPART()               Extract dirname from path
  354. * PUBSCREENLIST()          Get list of all pubscreens currently open
  355. * PUBSCREENTOBACK()        Move a pubscreen to the back
  356. * PUBSCREENTOFRONT()       Move a pubscreen to the front
  357. * QSORT()                  Sort list with QuickSort
  358. * RAND()                   Get a random number
  359. * READCLIPBOARD()          Read text from clipboard
  360. * READFILE()               Read a textfile into a compound variable
  361. * READLINES()              Read a part of a textfile into a compound variable
  362. * REXXTRICKSVERSION()      Get version of rexxtricks.library
  363. * SCSI_DEVICETYPE()        Get type of a SCSI-Device, DISK, TAPE etc.
  364. * SCSI_MANUFACTURER()      Get manufacturer of a SCSI-Device
  365. * SCSI_PRODUCT()           Get product-string of a SCSI-Device
  366. * SCSI_REVISION()          Get revision-string of a SCSI-Device
  367. * SCSI_TESTREADY()         Test whether a SCSI-Device is ready or not
  368. * SEARCHPATTERN()          Search for pattern in a textfile
  369. * SETCOMMENT()             Set comment of a file
  370. * SETDEFAULTPUBSCREEN()    Set new default pubscreen
  371. * SETDEFAULTTOOL()         Set default tool of an icon
  372. * SETENV()                 Set environment variable
  373. * SETPROTECTION()          Set protection flags of a file
  374. * SETPUBSCREENMODES()      Set new pubscreen modes
  375. * SETSTACK()               Set the stacksize of an icon
  376. * SETTOOLTYPES()           Set all tooltypes of an icon
  377. * SETTOOLTYPEVALUE()       Set the value of a tooltype
  378. * STEMCOPY()               Copy elements of a compound variable
  379. * STEMINSERT()             Insert elements in a compound variable
  380. * STEMREMOVE()             Remove elements of a compound variable
  381. * SUFFIXPART()             Get suffix of a filename
  382. * UNSETENV()               Remove environment variable
  383. * UUDECODE()               uudecode a file
  384. * UUENCODE()               uuencode a file
  385. * VIEWLIST()               Display list in a listview-window
  386. * WBINFO()                 Call the icon information window from workbench (OS3.0+)
  387. * WHATIS()                 Get filetype, uses 'whatis.library V4.0+'
  388. * WHATISTYPES()            Get a list of all currently known filetypes
  389. * WRITECLIPBOARD()         Write text to clipboard
  390. * WRITEFILE()              Write contents of a compound variable to a textfile
  391. * WRITELINES()             Replace or insert lines in a textfile
  392.  
  393. Function GETENV()
  394. *****************
  395.  
  396. NAME
  397.      contents = GETENV(variable)
  398.  
  399. ALIAS
  400.      contents = RXTR_GETENV(variable)
  401.  
  402. DESCRIPTION
  403.      Returns the contents of an environment variable.
  404.  
  405. ARGUMENTS
  406.      variable - Name of the variable
  407.  
  408. RESULT
  409.      contents - Contents of the variable
  410.  
  411. EXAMPLE
  412.      /* Get Kickstart-version */
  413.      
  414.      version = GETENV('Kickstart')
  415.      SAY 'Kickstart-Version =' version
  416.  
  417. SEE ALSO
  418.      SETENV(), UNSETENV()
  419.  
  420. Function SETENV()
  421. *****************
  422.  
  423. NAME
  424.      boolean = SETENV(variable,text)
  425.  
  426. ALIAS
  427.      boolean = RXTR_SETENV(variable,text)
  428.  
  429. DESCRIPTION
  430.      Sets the contents of an environment variable. The variable will be
  431.      created if it doesn't exist.
  432.  
  433. ARGUMENTS
  434.      variable - Name of the variable
  435.      
  436.      text     - New contents of the variable
  437.  
  438. RESULT
  439.      boolean  - 1 if successful, 0 for an error
  440.  
  441. EXAMPLE
  442.      /* Set Editor-variable */
  443.      
  444.      IF SETENV('Editor','C:ED') THEN
  445.         SAY "Variable 'Editor' is set to 'C:ED'!"
  446.      ELSE
  447.         SAY 'Error setting new editor!'
  448.  
  449. SEE ALSO
  450.      GETENV(), UNSETENV()
  451.  
  452. Function UNSETENV()
  453. *******************
  454.  
  455. NAME
  456.      boolean = UNSETENV(variable)
  457.  
  458. ALIAS
  459.      boolean = RXTR_UNSETENV(variable)
  460.  
  461. DESCRIPTION
  462.      Removes an enviranment variable. The variable will be deleted in
  463.      ENV:, but NOT in ENVARC:!
  464.  
  465. ARGUMENTS
  466.      variable - Name of the variable
  467.  
  468. RESULT
  469.      boolean  - 1 if successful, 0 for an error
  470.  
  471. EXAMPLE
  472.      /* Remove the variable 'Editor' */
  473.      
  474.      IF UNSETENV('Editor') THEN
  475.         SAY "Variable 'Editor' is removed!"
  476.      ELSE
  477.         SAY 'Error removing variable!'
  478.  
  479. SEE ALSO
  480.      GETENV(), SETENV()
  481.  
  482. Function PATHPART()
  483. *******************
  484.  
  485. NAME
  486.      dir = PATHPART(path)
  487.  
  488. ALIAS
  489.      dir = RXTR_PATHPART(path)
  490.  
  491. DESCRIPTION
  492.      Returns the directory comopnent of a path.
  493.  
  494. ARGUMENTS
  495.      path - An AmigaDOS path
  496.  
  497. RESULT
  498.      dir  - The directory component of the specified path
  499.  
  500. EXAMPLE
  501.      /* Get the directory component of a path */
  502.      
  503.      dir = PATHPART('DH0:Daten/Testfile')
  504.      SAY 'Directory =' dir
  505.  
  506. SEE ALSO
  507.      FILEPART(), MAKEPATH()
  508.  
  509. Function FILEPART()
  510. *******************
  511.  
  512. NAME
  513.      filename = FILEPART(path)
  514.  
  515. ALIAS
  516.      filename = RXTR_FILEPART(path)
  517.  
  518. DESCRIPTION
  519.      Returns the filename of a path.
  520.  
  521. ARGUMENTS
  522.      path     - An AmigaDOS path
  523.  
  524. RESULT
  525.      filename - The filename of the specified path
  526.  
  527. EXAMPLE
  528.      /* Get the filename of a path */
  529.      
  530.      filename = FILEPART('DH0:Daten/Testfile')
  531.      SAY 'Filename =' filename
  532.  
  533. SEE ALSO
  534.      PATHPART(), MAKEPATH()
  535.  
  536. Function MAKEPATH()
  537. *******************
  538.  
  539. NAME
  540.      path = MAKEPATH(dir,filename)
  541.  
  542. ALIAS
  543.      path = RXTR_MAKEPATH(dir,filename)
  544.  
  545. DESCRIPTION
  546.      Appends a filename to the end of a path.
  547.  
  548. ARGUMENTS
  549.      dir      - Directory path to add the 'filename' to
  550.  
  551.      filename - Filename, directory name or subpath to add
  552.  
  553. RESULT
  554.      path     - An AmigaDOS path that consists of the specified
  555.                 'dir' and 'filename'.
  556.  
  557. EXAMPLE
  558.      /* Add a filename to the end of a path */
  559.      
  560.      path = MAKEPATH('DH0:Daten','Testfile')
  561.      SAY 'Path =' path
  562.  
  563. SEE ALSO
  564.      PATHPART(), FILEPART()
  565.  
  566. Function SUFFIXPART()
  567. *********************
  568.  
  569. NAME
  570.      suffix = SUFFIXPART(path)
  571.  
  572. ALIAS
  573.      suffix = RXTR_SUFFIXPART(path)
  574.  
  575. DESCRIPTION
  576.      Returns the suffix of the file component of a path.
  577.  
  578. ARGUMENTS
  579.      path   - An AmigaDOS path which last component is a filename
  580.  
  581. RESULT
  582.      suffix - The suffix of the filename without the point, e.g. the
  583.               suffix of 'DH0:Test.lha' is 'lha'!
  584.  
  585. EXAMPLE
  586.      /* Get the suffix of a filename */
  587.      
  588.      suffix = SUFFIXPART('DH0:Daten/Testfile.txt')
  589.      SAY 'Suffix is =' suffix
  590.  
  591. SEE ALSO
  592.      MAKESUFFIX()
  593.  
  594. Function MAKESUFFIX()
  595. *********************
  596.  
  597. NAME
  598.      new_path = MAKESUFFIX(path,suffix,mode)
  599.  
  600. ALIAS
  601.      new_path = RXTR_MAKESUFFIX(path,suffix,mode)
  602.  
  603. DESCRIPTION
  604.      Appends a suffix to the end of the file component of a path, or
  605.      replaces an old suffix with the specified one.
  606.  
  607. ARGUMENTS
  608.      path     - An AmigaDOS path which last component is a filename
  609.      
  610.      suffix   - The new suffix for the filename, without point!
  611.      
  612.      mode     - Specifies whether the suffix should be appended to the
  613.                 filename or an existing suffix should be replaced.
  614.      
  615.                 Possible keywords are:
  616.      
  617.                 'APPEND'  or 'A' - Append the suffix to the filename
  618.      
  619.                 'REPLACE' or 'R' - Replace an existing suffix
  620.  
  621. RESULT
  622.      new_path - Pathname with the new suffix. A filename that would be
  623.                 longer than 30 characters is cut before the new suffix
  624.                 is appended.
  625.  
  626. EXAMPLE
  627.      /* Replace a suffix */
  628.      
  629.      jpegfile = MAKESUFFIX('DH0:gfx/picture.IFF','JPEG','REPLACE')
  630.      SAY 'The new filename is' jpegfile
  631.  
  632. SEE ALSO
  633.      SUFFIXPART()
  634.  
  635. Function GETCOMMENT()
  636. *********************
  637.  
  638. NAME
  639.      comment = GETCOMMENT(filename)
  640.  
  641. ALIAS
  642.      comment = RXTR_GETCOMMENT(filename)
  643.  
  644. DESCRIPTION
  645.      Returns the comment string of a file or directory.
  646.  
  647. ARGUMENTS
  648.      filename - File or directory to get the comment of.
  649.  
  650. RESULT
  651.      comment  - The comment of the specified file or directory.
  652.  
  653. EXAMPLE
  654.      /* Get comment of a file */
  655.      
  656.      comment = GETCOMMENT('DH0:Data/Testfile')
  657.      SAY 'Comment =' comment
  658.  
  659. SEE ALSO
  660.      SETCOMMENT()
  661.  
  662. Function SETCOMMENT()
  663. *********************
  664.  
  665. NAME
  666.      boolean = SETCOMMENT(filename,comment)
  667.  
  668. ALIAS
  669.      boolean = RXTR_SETCOMMENT(filename,comment)
  670.  
  671. DESCRIPTION
  672.      Sets the comment string of a file or directory.
  673.  
  674. ARGUMENTS
  675.      filename - The file or directory, which comment should be set.
  676.  
  677. RESULT
  678.      boolean  - 1 if successful, 0 for an error
  679.  
  680. EXAMPLE
  681.      /* set comment on a file */
  682.      
  683.      IF SETCOMMENT('DH0:Data/Testfile','This is a testfile') THEN
  684.         SAY 'New comment is set!'
  685.      ELSE
  686.         SAY 'Error setting the new comment!'
  687.  
  688. SEE ALSO
  689.      GETCOMMENT()
  690.  
  691. Function GETPROTECTION()
  692. ************************
  693.  
  694. NAME
  695.      flags = GETPROTECTION(filename)
  696.  
  697. ALIAS
  698.      flags = RXTR_GETPROTECTION(filename)
  699.  
  700. DESCRIPTION
  701.      Returns the protection flags of a file.
  702.  
  703. ARGUMENTS
  704.      filename - Name of the file
  705.  
  706. RESULT
  707.      flags    - A string that contains the protection flags in the
  708.                 format 'HSPARWED'. An uppercase character indicates
  709.                 that the flag is set, a '-' indicates that the flag
  710.                 is not set.
  711.  
  712. EXAMPLE
  713.      /* Get protection flags of a file */
  714.      
  715.      flags = GETPROTECTION('DH0:Testfile')
  716.      SAY 'Protection flags =' flags
  717.  
  718. SEE ALSO
  719.      SETPROTECTION()
  720.  
  721. Function SETPROTECTION()
  722. ************************
  723.  
  724. NAME
  725.      boolean = SETPROTECTION(flags)
  726.  
  727. ALIAS
  728.      boolean = RXTR_SETPROTECTION(flags)
  729.  
  730. DESCRIPTION
  731.      Sets the protection flags of a file.
  732.  
  733. ARGUMENTS
  734.      flags    - A string that contains the protection flags in the
  735.                 format 'HSPARWED'. An uppercase character indicates
  736.                 that the flag should be set, a '-' indicates that
  737.                 the flag should not be set.
  738.  
  739. RESULT
  740.      boolean  - 1 if successful, 0 for an error
  741.  
  742. EXAMPLE
  743.      /* Set protection flags of a file */
  744.      
  745.      IF SETPROTECTION('DH0:Testfile','-S-RWE-') THEN
  746.         SAY 'Protection flags are set!'
  747.      ELSE
  748.         SAY 'Cannot set protection flags!'
  749.  
  750. SEE ALSO
  751.      GETPROTECTION()
  752.  
  753. Function MATCHPATTERN()
  754. ***********************
  755.  
  756. NAME
  757.      boolean = MATCHPATTERN(string,pattern,case)
  758.  
  759. ALIAS
  760.      boolean = RXTR_MATCHPATTERN(string,pattern,case)
  761.  
  762. DESCRIPTION
  763.      Checks for a pattern match with a string.
  764.  
  765. ARGUMENTS
  766.      string  - String to match against pattern
  767.      
  768.      pattern - AmigaDOS pattern
  769.      
  770.      case    - Specifies whether the string should be matched
  771.                case-sensitive against the pattern or not.
  772.      
  773.                Possible keywords are:
  774.      
  775.                'CASE'   or 'C' - case-sensitive
  776.      
  777.                'NOCASE' or 'N' - case-insensitive
  778.      
  779.                If this argument is omitted, the string is matched
  780.                case-insensitive.
  781.  
  782. RESULT
  783.      boolean - 1 if the string matches pattern, 0 if not or for an error
  784.  
  785. EXAMPLE
  786.      /* Check for a pattern match with a string */
  787.      
  788.      IF MATCHPATTERN('Testtext','t#?','CASE') THEN
  789.         SAY 'The string matches pattern'
  790.      ELSE
  791.         SAY 'No match found'
  792.  
  793. SEE ALSO
  794.      SEARCHPATTERN()
  795.  
  796. Function SEARCHPATTERN()
  797. ************************
  798.  
  799. NAME
  800.      result = SEARCHPATTERN(filename,pattern,start,mode,case)
  801.  
  802. ALIAS
  803.      result = RXTR_SEARCHPATTERN(filename,pattern,start,mode,case)
  804.  
  805. DESCRIPTION
  806.      Reads a textfile and checks for a pattern match with each line of the
  807.      file.
  808.  
  809. ARGUMENTS
  810.      filename - Name of the textfile
  811.      
  812.      pattern  - AmigaDOS pattern
  813.      
  814.      start    - Specifies the position within the file to begin with
  815.                 the pattern match. This can be the number of a line or
  816.                 a byte offset, depending on the 'mode' argument.
  817.      
  818.      mode     - Specifies the type of the 'start' argument and the
  819.                 'result'.
  820.      
  821.                 Possible keywords are:
  822.      
  823.                 'BYTE' or 'B' - 'start' and 'result' are byte offsets
  824.                                 from the beginning of the file. An offset
  825.                                 of 0 specifies the first byte of the file.
  826.      
  827.                 'LINE' or 'L' - 'start' and 'result' are line numbers.
  828.                                 A number of 1 specifies the first line of
  829.                                 the file.
  830.      
  831.                 If you have specified 'BYTE', the 'result' is the byte
  832.                 offset of the line that matches pattern. You can read
  833.                 this line using the ARexx function 'SEEK()' to move the
  834.                 file pointer to the beginning of the line and then read
  835.                 it with 'READLN()'.
  836.      
  837.                 If this argument is omitted, 'start' and 'result' are
  838.                 line numbers.
  839.      
  840.      case     - Specifies whether the lines of the file should be
  841.                 matched case-sensitive against the pattern or not.
  842.      
  843.                 Possible keywords are:
  844.      
  845.                 'CASE'   or 'C' - case-sensitive
  846.      
  847.                 'NOCASE' or 'N' - case-insensitive
  848.      
  849.                 If this argument is omitted, the lines are matched
  850.                 case-insensitive.
  851.  
  852. RESULT
  853.      result   - Line number or byte offset of the found line, depending
  854.                 on the 'mode' argument, or -1 if no match is found.
  855.      
  856.                 The found line is stored in the variable 'RESULT'.
  857.  
  858. EXAMPLE
  859.      /* Search for pattern in a textfile */
  860.      
  861.      line = SEARCHPATTERN('S:User-Startup','Assign#?MAILFILTER:',1,'LINE','NOCASE')
  862.      
  863.      IF line ~= -1 THEN
  864.         SAY 'MailFilter assign found at line:' line
  865.      ELSE
  866.         SAY 'Sorry, no MailFilter assign found.'
  867.  
  868. SEE ALSO
  869.      MATCHPATTERN()
  870.  
  871. Function GETDIR()
  872. *****************
  873.  
  874. NAME
  875.      boolean = GETDIR(dirname,pattern,stemvar,type,result,subdirs)
  876.  
  877. ALIAS
  878.      boolean = RXTR_GETDIR(dirname,pattern,stemvar,type,result,subdirs)
  879.  
  880. DESCRIPTION
  881.      Reads a directory and stores all entries in a compound variable.
  882.  
  883. ARGUMENTS
  884.      dirname - Name of the directory to read
  885.      
  886.      pattern - An AmigaDOS Pattern. Only entries matching this pattern
  887.                are stored in the compound variable. This is optional, all
  888.                entries are stored if no pattern is specified.
  889.      
  890.      stemvar - Compound variable to store the directory entries:
  891.      
  892.                stemvar.0 - the number of entries
  893.                stemvar.1 - the first entry
  894.                stemvar.2 - the second entry
  895.                stemvar.n - the n'th entry
  896.      
  897.      type    - Type of the entries, that should be stored in the
  898.                compound variable.
  899.      
  900.                Possible keywords are:
  901.      
  902.                'ALL'   or 'A' - All entries are stored
  903.      
  904.                'FILES' or 'F' - Only files are stored
  905.      
  906.                'DIRS'  or 'D' - Only directories are stored
  907.      
  908.                If this is omitted, all entries are stored.
  909.      
  910.      result  - Specifies whether the complete path or only the name of
  911.                the entries should be stored in the compound variable.
  912.      
  913.                Possible keywords are:
  914.      
  915.                'NAME' or 'N' - Only the name is stored
  916.      
  917.                'PATH' or 'P' - The complete path is stored
  918.      
  919.                If this is omitted, only the name is stored.
  920.      
  921.      subdirs - Specifies whether all found subdirectories should be
  922.                entered and read or not.
  923.      
  924.                Possible keywords are:
  925.      
  926.                'SUBDIRS' or 'S' - All found subdirectories are entered
  927.                                   and read
  928.      
  929.                If this is omitted, only the directory specified with
  930.                'dirname' is read.
  931.  
  932. RESULT
  933.      boolean - 1 if successful, 0 for an error
  934.  
  935. EXAMPLE
  936.      /*
  937.      ** Read a directory and all subdirectories and display the
  938.      ** complete path of all entries, don't display icons
  939.      */
  940.      
  941.      IF GETDIR('DEVS:','~(#?.info)','stemvar','FILES','PATH','SUBDIRS') THEN DO
  942.         SAY 'Number of entries:' stemvar.0
  943.      
  944.         DO i = 1 TO stemvar.0
  945.            SAY stemvar.i
  946.         END
  947.      END
  948.  
  949. SEE ALSO
  950.      -/-
  951.  
  952. Function GETKEY()
  953. *****************
  954.  
  955. NAME
  956.      key = GETKEY(timeout)
  957.  
  958. ALIAS
  959.      key = RXTR_GETKEY(timeout)
  960.  
  961. DESCRIPTION
  962.      Waits the specified time for a key.
  963.  
  964. ARGUMENTS
  965.      timeout - Time to wait in Seconds
  966.  
  967. RESULT
  968.      key     - If the user presses a key within the specified time, the
  969.                corresponding character is returned. If no key is pressed,
  970.                the function returns -1.
  971.      
  972.                Special keys are returned as follows:
  973.  
  974.                                    |     qualifiers
  975.                                    |
  976.                     key            | none    | SHIFT
  977.                     ---------------+---------+------------
  978.                     F1             | F1      | SHIFT F1
  979.                     F2             | F2      | SHIFT F2
  980.                     F3             | F3      | SHIFT F3
  981.                     F4             | F4      | SHIFT F4
  982.                     F5             | F5      | SHIFT F5
  983.                     F6             | F6      | SHIFT F6
  984.                     F7             | F7      | SHIFT F7
  985.                     F8             | F8      | SHIFT F8
  986.                     F9             | F9      | SHIFT F9
  987.                     F10            | F10     | SHIFT F10
  988.                                    |         |
  989.                     Esc            | ESC     | ESC
  990.                     Help           | HELP    | HELP
  991.                                    |         |
  992.                     Return         | CR      | CR
  993.                     Enter          | CR      | CR
  994.                                    |         |
  995.                     Backspace      | BS      | BS
  996.                     Delete         | DEL     | DEL
  997.                                    |         |
  998.                     Cursor Oben    | UP      | SHIFT UP
  999.                     Cursor Unten   | DOWN    | SHIFT DOWN
  1000.                     Cursor Links   | LEFT    | SHIFT LEFT
  1001.                     Cursor Rechts  | RIGHT   | SHIFT RIGHT
  1002.      
  1003.                If you have defined a string for the pressed key, e.g. with
  1004.                the commodity 'FKey', the defined string is returned.
  1005.  
  1006. EXAMPLE
  1007.      /* Wait ten seconds for a key */
  1008.      
  1009.      key = GETKEY(10)
  1010.      
  1011.      IF key ~= (-1) THEN
  1012.         SAY 'Key pressed:' key
  1013.      ELSE
  1014.         SAY 'No key was pressed!'
  1015.  
  1016. SEE ALSO
  1017.      -/-
  1018.  
  1019. Function READFILE()
  1020. *******************
  1021.  
  1022. NAME
  1023.      boolean = READFILE(filename,stemvar)
  1024.  
  1025. ALIAS
  1026.      boolean = RXTR_READFILE(filename,stemvar)
  1027.  
  1028. DESCRIPTION
  1029.      Reads the contents of a textfile into a compound variable. Each line is
  1030.      stored as an element of the variable, all linefeeds (ASCII code: 10)
  1031.      are removed automatically.
  1032.  
  1033. ARGUMENTS
  1034.      filename  - File to read from
  1035.      
  1036.      stemvar   - Compound variable to store the contents of the textfile,
  1037.                  each element will contain one line without linefeed:
  1038.      
  1039.                  stemvar.0 - the number of lines
  1040.                  stemvar.1 - the first line
  1041.                  stemvar.2 - the second line
  1042.                  stemvar.n - the n'th line
  1043.  
  1044. RESULT
  1045.      boolean   - 1 if successful, 0 for an error
  1046.  
  1047. EXAMPLE
  1048.      /* Read 's:user-startup' into a compound variable and display all lines */
  1049.      
  1050.      IF READFILE('s:user-startup','array') THEN DO
  1051.         SAY 'Number of lines:' array.0
  1052.      
  1053.         DO i = 1 TO array.0
  1054.            SAY 'Zeile' i||':' array.i
  1055.         END
  1056.      END
  1057.  
  1058. SEE ALSO
  1059.      WRITEFILE()
  1060.  
  1061. Function WRITEFILE()
  1062. ********************
  1063.  
  1064. NAME
  1065.      boolean = WRITEFILE(filename,stemvar,append)
  1066.  
  1067. ALIAS
  1068.      boolean = RXTR_WRITEFILE(filename,stemvar,append)
  1069.  
  1070. DESCRIPTION
  1071.      Writes the contents of a compound variable to a file. A linefeed
  1072.      (ASCII code: 10) is appended to each element of the variable.
  1073.  
  1074. ARGUMENTS
  1075.      filename   - File to use for writing
  1076.      
  1077.      stemvar    - Compound variable which should be written to the
  1078.                   file, this variable must have the following format:
  1079.      
  1080.                   stemvar.0 - must be the number of lines
  1081.                   stemvar.1 - must be the first line
  1082.                   stemvar.2 - must be the second line
  1083.                   stemvar.n - muste be the n'th line
  1084.      
  1085.      append     - With this switch you can specify that teh contents of
  1086.                   'stemvar' should be appended to the file. In this case,
  1087.                   the file must exist!
  1088.      
  1089.                   Possible keywords:
  1090.      
  1091.                   'APPEND' or 'A' - Append 'stemvar' to an existing file.
  1092.      
  1093.                   All other words are ignored.
  1094.  
  1095. RESULT
  1096.      boolean    - 1 if successful, 0 for an error
  1097.  
  1098. EXAMPLE
  1099.      /* Write contents of a compound variable to a file */
  1100.      
  1101.      list.0 = 4
  1102.      list.1 = 'Hello'
  1103.      list.2 = 'Good morning'
  1104.      list.3 = 'Bye bye'
  1105.      list.4 = 'Nice to see you'
  1106.      
  1107.      IF WRITEFILE('RAM:Test','list') THEN
  1108.         SAY 'Okay, no errors!'
  1109.  
  1110. SEE ALSO
  1111.      READFILE()
  1112.  
  1113. Function READLINES()
  1114. ********************
  1115.  
  1116. NAME
  1117.      boolean = READLINES(filename,start,number,format,stemvar)
  1118.  
  1119. ALIAS
  1120.      boolean = RXTR_READLINES(filename,start,number,format,stemvar)
  1121.  
  1122. DESCRIPTION
  1123.      Reads a part of a textfile into a compound variable. The lines are
  1124.      read and converted using the specified format string. All linefeeds
  1125.      are removed before converting.
  1126.  
  1127. ARGUMENTS
  1128.      filename - File to read from
  1129.      
  1130.      start    - Number of the first line to read, the minimal line
  1131.                 number is 1. If this argument is omitted, the function
  1132.                 will read from beginning of the file.
  1133.      
  1134.      number   - Number of lines to read. If this argument is omitted,
  1135.                 the function will read until end of the file.
  1136.      
  1137.      format   - Formatstring which describes how to convert each line.
  1138.                 This string can contain as many conversion specifications
  1139.                 as you like. You must specify a variable for each of the
  1140.                 conversion specifications. (see argument 'stemvar')
  1141.      
  1142.                 The maximum length for each of the converted elements
  1143.                 is 1024 characters! The total length of one line is 4096
  1144.                 characters!
  1145.      
  1146.                 When a line is read, the formatstring is searched for the
  1147.                 first conversion specification. If found, a part of the
  1148.                 line is converted and stored as an element of the first
  1149.                 compound variable. After this, the next part of the line
  1150.                 is converted using the next conversion specification, and
  1151.                 stored as an element of the next compound variable. etc.
  1152.      
  1153.                 The formatstring may contain three different types of
  1154.                 characters and instructions:
  1155.      
  1156.                 1. white space (space, tab and linefeed characters)
  1157.      
  1158.                    Any white space characters cause the conversion to
  1159.                    continue with the next character in the input line
  1160.                    that is not white space.
  1161.      
  1162.                 2. all other characters without the percent sign '%'
  1163.      
  1164.                    For each of this characters, a matching character
  1165.                    is read from the input line. If there is not an
  1166.                    exact match, the conversion stops at this point.
  1167.      
  1168.                 3. conversion specifications
  1169.      
  1170.                    A conversion specification indicates how the next
  1171.                    part of the input line is to be converted. Each
  1172.                    conversion specification starts with the percent
  1173.                    sign '%' and follows this format, brackets indicate
  1174.                    an optional part:
  1175.      
  1176.                    %[*][width]type
  1177.      
  1178.                    %       - The percent sign introduces a conversion
  1179.                              specification. If you want to match a '%'
  1180.                              in the input line, use '%%' in the format
  1181.                              string.
  1182.      
  1183.                    *       - The asterisk means that the conversion
  1184.                              should be performed, but the result should
  1185.                              not be stored. Do not specify a variable
  1186.                              for a conversion specification that uses
  1187.                              this.
  1188.      
  1189.                    width   - A decimal number which specifies the maximum
  1190.                              number of characters to be converted. If
  1191.                              'type' is 'c' exact 'width' characters are
  1192.                              converted, the conversion will not stop
  1193.                              at a white space character,
  1194.      
  1195.                    type    - Specifies the type of the conversion, two
  1196.                              different types are supported:
  1197.      
  1198.                              s - Indicates a character string terminated
  1199.                                  by white space or end of the input line.
  1200.                                  Also, the conversion stops if maximum
  1201.                                  width is specified and 'width' characters
  1202.                                  are converted.
  1203.      
  1204.                              c - Indicates conversion of one character.
  1205.                                  If maximum width is specified, exact
  1206.                                  'width' characters will be converted.
  1207.                                  The conversion doesn't stop at white
  1208.                                  space characters.
  1209.      
  1210.      stemvar  - Compound variables to store the converted parts of the
  1211.                 input line, for each conversion specification you must
  1212.                 specify a variable. The variable names are specified
  1213.                 separated by a 'space' or 'tab':
  1214.      
  1215.                 Example: READLINES(file,10,3,'%s %5c','stemvar1 stemvar2')
  1216.      
  1217.                 stemvar1.0 - will be the number of lines,
  1218.                              at this example it will be 3
  1219.                 stemvar1.1 - will be the first item of the first line,
  1220.                              at this example the first item of line 10
  1221.                 stemvar1.2 - will be the first item of the second line,
  1222.                              at this example the first item of line 11
  1223.                 stemvar1.3 - will be the first item of the third line,
  1224.                              at this example the first item of line 12
  1225.      
  1226.                 stemvar2.0 - will be the number of lines,
  1227.                              at this example it will be 3
  1228.                 stemvar2.1 - will be the second item of the first line,
  1229.                              at this example the second item of line 10
  1230.                 stemvar2.2 - will be the second item of the second line,
  1231.                              at this example the second item of line 11
  1232.                 stemvar2.3 - will be the second item of the third line,
  1233.                              at this example the second item of line 12
  1234.  
  1235. RESULT
  1236.      boolean  - 1 if successful, 0 for an error
  1237.  
  1238. EXAMPLE
  1239.      /*
  1240.      ** Create a file using the DOS command 'List', read a part of
  1241.      ** the file into compound variables and display the results.
  1242.      */
  1243.      
  1244.      ADDRESS COMMAND 'List >T:tempfile LFORMAT "%-30N %L Byte %A %D %T"'
  1245.      
  1246.      IF READLINES('T:tempfile',5,20,'%30c %s Byte %s %s %s','name bytes flags filedate filetime') THEN DO
  1247.         SAY 'Number of lines:' name.0
  1248.         SAY
  1249.      
  1250.         DO i = 1 TO name.0
  1251.            IF bytes.i = 'Dir' THEN
  1252.               SAY 'No.' i '-> Directory:' STRIP(name.i)
  1253.            ELSE
  1254.               SAY 'No.' i '-> File:' STRIP(name.i) '-' bytes.i 'Byte'
  1255.      
  1256.            SAY 'Flags:' flags.i
  1257.            SAY 'Date :' filedate.i
  1258.            SAY 'Time :' filetime.i
  1259.            SAY
  1260.         END
  1261.      END
  1262.  
  1263. SEE ALSO
  1264.      WRITELINES()
  1265.  
  1266. Function WRITELINES()
  1267. *********************
  1268.  
  1269. NAME
  1270.      boolean = WRITELINES(filename,start,stemvar,mode)
  1271.  
  1272. ALIAS
  1273.      boolean = RXTR_WRITELINES(filename,start,stemvar,mode)
  1274.  
  1275. DESCRIPTION
  1276.      Replaces lines of a textfile with the contents of a compound variable,
  1277.      or inserts the contents of a compound variable in a textfile.
  1278.  
  1279. ARGUMENTS
  1280.      filename - File to write to
  1281.      
  1282.      start    - Number of the first line to write, the minimal line
  1283.                 number is 1. If this argument is omitted, the function
  1284.                 will write to the first line of the file.
  1285.      
  1286.      stemvar  - Compound variable which should be written to the file,
  1287.                 this variable must have the following format:
  1288.      
  1289.                 stemvar.0 - must be the number of lines
  1290.                 stemvar.1 - must be the first line
  1291.                 stemvar.2 - must be the second line
  1292.                 stemvar.n - must be the n'th line
  1293.      
  1294.      mode     - Specifies how the contents of the compound variable
  1295.                 should be written to the file:
  1296.      
  1297.                 'REPLACE' or 'R'- Lines in the file will be replaced
  1298.                                   beginning at the specified 'start'
  1299.                                   line. Each element of the compound
  1300.                                   variable replaces one line of the
  1301.                                   file. For example, if 'stemvar' has
  1302.                                   10 elements, 10 lines are replaced.
  1303.                                   All following lines are copied from
  1304.                                   the original file.
  1305.      
  1306.                 'INSERT' or 'I' - All elements of the compound variable
  1307.                                   are inserted in the file, beginning
  1308.                                   at the specified 'start' line.
  1309.  
  1310. RESULT
  1311.      bool     - 1 if successful, 0 for an error
  1312.  
  1313. EXAMPLE
  1314.      /*
  1315.      ** Read the lines 10, 11 and 12 from 'RAM:testfile',
  1316.      ** change it and write back to the file.
  1317.      */
  1318.      
  1319.      IF READLINES('RAM:testfile',10,3,'%256c','line') THEN DO
  1320.         DO i = 1 TO line.0
  1321.            line.i = 'This is line' i+9 '-' line.i
  1322.         END
  1323.      
  1324.         IF ~WRITELINES('RAM:testfile',10,'line','REPLACE') THEN
  1325.            SAY 'Error writing to file!'
  1326.      END
  1327.      ELSE
  1328.         SAY 'Error reading from file!'
  1329.  
  1330. SEE ALSO
  1331.      READLINES()
  1332.  
  1333. Function SCSI_DEVICETYPE()
  1334. **************************
  1335.  
  1336. NAME
  1337.      type = SCSI_DEVICETYPE(device,unit)
  1338.  
  1339. ALIAS
  1340.      type = RXTR_SCSI_DEVICETYPE(device,unit)
  1341.  
  1342. DESCRIPTION
  1343.      Returns the type of the SCSI peripheral connected to the specified
  1344.      device and unit.
  1345.  
  1346. ARGUMENTS
  1347.      device - Name of the SCSI device
  1348.      
  1349.      unit   - Unit number
  1350.  
  1351. RESULT
  1352.      type   - Type of the peripheral:
  1353.      
  1354.               DISK          - disk drive, hard disk
  1355.               TAPE          - tape streamer
  1356.               PRINTER       - printer
  1357.               PROCESSOR     - processor device
  1358.               WORM          - WORM drive
  1359.               CDROM         - CD-ROM drive
  1360.               SCANNER       - scanner
  1361.               OPTICAL       - optical disk drive
  1362.               MEDIACHANGER  - medium changer device
  1363.               COMMUNICATION - communications device
  1364.               UNKNOWN       - unknown device type
  1365.      
  1366.               If no peripheral is connected to the specified device
  1367.               and unit, an empty string '' is returned.
  1368.  
  1369. EXAMPLE
  1370.      /* Display the type of the peripheral connected to 'scsi.device' unit 0 */
  1371.      
  1372.      SAY SCSI_DEVICETYPE('scsi.device',0)
  1373.  
  1374. SEE ALSO
  1375.      SCSI_MANUFACTURER(), SCSI_PRODUCT(), SCSI_REVISION(), SCSI_TESTREADY()
  1376.  
  1377. Function SCSI_MANUFACTURER()
  1378. ****************************
  1379.  
  1380. NAME
  1381.      manufacturer = SCSI_MANUFACTURER(device,unit)
  1382.  
  1383. ALIAS
  1384.      manufacturer = RXTR_SCSI_MANUFACTURER(device,unit)
  1385.  
  1386. DESCRIPTION
  1387.      Returns the manufacturer of the SCSI peripheral connected to the
  1388.      specified device and unit.
  1389.  
  1390. ARGUMENTS
  1391.      device       - Name of the SCSI device
  1392.      
  1393.      unit         - Unit number
  1394.  
  1395. RESULT
  1396.      manufacturer - The manufacturer information of the peripheral, or
  1397.                     an empty string '' if no peripheral is connected
  1398.                     to the specified device and unit.
  1399.  
  1400. EXAMPLE
  1401.      /* Display the manufacturer of a peripheral */
  1402.      
  1403.      SAY SCSI_MANUFACTURER('scsi.device',0)
  1404.  
  1405. SEE ALSO
  1406.      SCSI_DEVICETYPE(), SCSI_PRODUCT(), SCSI_REVISION(), SCSI_TESTREADY()
  1407.  
  1408. Function SCSI_PRODUCT()
  1409. ***********************
  1410.  
  1411. NAME
  1412.      product = SCSI_PRODUCT(device,unit)
  1413.  
  1414. ALIAS
  1415.      product = RXTR_SCSI_PRODUCT(device,unit)
  1416.  
  1417. DESCRIPTION
  1418.      Returns the product description string of the SCSI peripheral
  1419.      connected to the specified device and unit.
  1420.  
  1421. ARGUMENTS
  1422.      device  - Name of the SCSI device
  1423.      
  1424.      unit    - Unit number
  1425.  
  1426. RESULT
  1427.      product - The product description string of the peripheral, or
  1428.                an empty string '' if no peripheral is connected
  1429.                to the specified device and unit.
  1430.  
  1431. EXAMPLE
  1432.      /* Display the product string of a peripheral */
  1433.      
  1434.      SAY SCSI_PRODUCT('scsi.device',0)
  1435.  
  1436. SEE ALSO
  1437.      SCSI_DEVICETYPE(), SCSI_MANUFACTURER(), SCSI_REVISION(),
  1438.      SCSI_TESTREADY()
  1439.  
  1440. Function SCSI_REVISION()
  1441. ************************
  1442.  
  1443. NAME
  1444.      revision = SCSI_REVISION(device,unit)
  1445.  
  1446. ALIAS
  1447.      revision = RXTR_SCSI_REVISION(device,unit)
  1448.  
  1449. DESCRIPTION
  1450.      Returns the revision string of the SCSI peripheral connected to the
  1451.      specified device and unit.
  1452.  
  1453. ARGUMENTS
  1454.      device   - Name of the SCSI device
  1455.      
  1456.      unit     - Unit number
  1457.  
  1458. RESULT
  1459.      revision - The revision string of the peripheral, or an empty
  1460.                 string '' if no peripheral is connected to the
  1461.                 specified device and unit.
  1462.  
  1463. EXAMPLE
  1464.      /* Display the revision string of a peripheral */
  1465.      
  1466.      SAY SCSI_REVISION('scsi.device',0)
  1467.  
  1468. SEE ALSO
  1469.      SCSI_DEVICETYPE(), SCSI_MANUFACTURER(), SCSI_PRODUCT(),
  1470.      SCSI_TESTREADY()
  1471.  
  1472. Function SCSI_TESTREADY()
  1473. *************************
  1474.  
  1475. NAME
  1476.      boolean = SCSI_TESTREADY(device,unit)
  1477.  
  1478. ALIAS
  1479.      boolean = RXTR_SCSI_TESTREADY(device,unit)
  1480.  
  1481. DESCRIPTION
  1482.      Checks whether a SCSI peripheral is ready for use or not. e.g.: With
  1483.      removable cartridge drives you can check if a cartridge is inserted in
  1484.      the drive.
  1485.  
  1486. ARGUMENTS
  1487.      device  - Name of the SCSI device
  1488.      
  1489.      unit    - Unit number
  1490.  
  1491. RESULT
  1492.      boolean - 1 if the peripheral is ready for use, 0 if not
  1493.  
  1494. EXAMPLE
  1495.      /* Check the peripheral at 'scsi.device' unit 0 */
  1496.      
  1497.      IF SCSI_TESTREADY('scsi.device',0) THEN
  1498.         SAY 'Peripheral is ready for use!'
  1499.      ELSE
  1500.         SAY 'Peripheral is not ready!'
  1501.  
  1502. SEE ALSO
  1503.      SCSI_DEVICETYPE(), SCSI_MANUFACTURER(), SCSI_PRODUCT(), SCSI_REVISION()
  1504.  
  1505. Function READCLIPBOARD()
  1506. ************************
  1507.  
  1508. NAME
  1509.      result = READCLIPBOARD(unit,destvar)
  1510.  
  1511. ALIAS
  1512.      result = RXTR_READCLIPBOARD(unit,destvar)
  1513.  
  1514. DESCRIPTION
  1515.      Reads text from clipboard and stores each line in the specified
  1516.      compound variable, or returns the whole clipboard contents as result.
  1517.  
  1518. ARGUMENTS
  1519.      unit    - Clipboard-Unit to read from
  1520.      
  1521.      destvar - Name of a compound variable to store the clipboard
  1522.                contents. Each line will be stored in one element
  1523.                of the variable:
  1524.      
  1525.                destvar.0 - the number of lines
  1526.                destvar.1 - the first line
  1527.                destvar.2 - the second line
  1528.                destvar.n - the n'th line
  1529.      
  1530.                If destvar is not specified, the whole contents will
  1531.                be returned as result.
  1532.  
  1533. RESULT
  1534.      result  - If 'destvar' is not specified, result will be the whole
  1535.                clipboard contents.
  1536.      
  1537.                If 'destvar' is specified, result will be an empty string ".
  1538.  
  1539. EXAMPLE
  1540.      /* read from clipboard unit 0 and display the contents */
  1541.      
  1542.      SAY READCLIPBOARD(0)
  1543.      
  1544.      SAY '------------------'
  1545.      
  1546.      CALL READCLIPBOARD(0,'array')
  1547.      
  1548.      SAY 'Number of lines:' array.0
  1549.      
  1550.      DO i = 1 TO array.0
  1551.         SAY 'Line' i || ':' array.i
  1552.      END
  1553.  
  1554. SEE ALSO
  1555.      WRITECLIPBOARD()
  1556.  
  1557. Function WRITECLIPBOARD()
  1558. *************************
  1559.  
  1560. NAME
  1561.      boolean = WRITECLIPBOARD(unit,string,stemvar)
  1562.  
  1563. ALIAS
  1564.      boolean = RXTR_WRITECLIPBOARD(unit,string,stemvar)
  1565.  
  1566. DESCRIPTION
  1567.      Writes a string or the contents of a compound variable to the
  1568.      specified clipboard unit.
  1569.  
  1570. ARGUMENTS
  1571.      unit    - clipboard unit to write to
  1572.      
  1573.      string  - String to write to the clipboard
  1574.      
  1575.      stemvar - Name of a compound variable, which contents should be
  1576.                written to the clipboard. A linefeed is appended to each
  1577.                element of the variable. The compound variable must have
  1578.                the following format:
  1579.      
  1580.                stemvar.0 - must be the number of lines
  1581.                stemvar.1 - must be the first line
  1582.                stemvar.2 - must be the second line
  1583.                stemvar.n - must be the n'th line
  1584.      
  1585.                You can specify either 'string' or 'stemvar'. If 'stemvar'
  1586.                isn't specified, the 'string' will be written to clipboard.
  1587.  
  1588. RESULT
  1589.      boolean - 1 if successful, 0 for an error
  1590.  
  1591. EXAMPLE
  1592.      /* write text to clipboard unit 0 */
  1593.      
  1594.      IF WRITECLIPBOARD(0,'This is a test') THEN
  1595.         SAY 'Okay!'
  1596.      ELSE
  1597.         SAY 'Error writing to clipboard!'
  1598.  
  1599. SEE ALSO
  1600.      READCLIPBOARD()
  1601.  
  1602. Function QSORT()
  1603. ****************
  1604.  
  1605. NAME
  1606.      boolean = QSORT(list,destvar,case,field,separator)
  1607.  
  1608. ALIAS
  1609.      boolean = RXTR_QSORT(list,destvar,case,field,separator)
  1610.  
  1611. DESCRIPTION
  1612.      Sort list in ascending order.
  1613.  
  1614. ARGUMENTS
  1615.      list      - The list to be sorted, this must be a compound variable
  1616.                  with the following format:
  1617.      
  1618.                  list.0 - must be the number of elements in the list
  1619.                  list.1 - must be the first element of the list
  1620.                  list.2 - must be the second element of the list
  1621.                  list.n - must be the n'th element of the list
  1622.      
  1623.      destvar   - Compound variable to store the sorted list. The sorted
  1624.                  list is stored similar to the source list:
  1625.      
  1626.                  destvar.0 - is the number of elements
  1627.                  destvar.1 - is the first element
  1628.                  destvar.2 - is the second element
  1629.                  destvar.n - is the n'th element
  1630.      
  1631.                  This is optional. If no 'destvar' is specified, the list
  1632.                  is sorted directly.
  1633.      
  1634.      case      - Specifies whether the list should be sorted case sensitive
  1635.                  or not. If this argument is omitted, the list is sorted
  1636.                  case insensitive.
  1637.      
  1638.                  Possible keywords:
  1639.      
  1640.                  'CASE'    or 'C'   - sort case sensitive
  1641.                  'NOCASE'  or 'N'   - sort case insensitive
  1642.                  'NUMERIC' or 'NUM' - sort by number
  1643.      
  1644.      field     - Number of a field, separated by the character which is
  1645.                  specified with the 'separator' argument. The List is
  1646.                  sorted according to this field. The number of the first
  1647.                  field is 1. If no 'field' is specified, the list is
  1648.                  sorted by the complete contents of the variable.
  1649.      
  1650.      separator - The character which separates the fields in each element
  1651.                  of the list. This argument is only used if a field number
  1652.                  is specified. The default separator is space ' ', it will
  1653.                  be used if a field number is specified but no separator
  1654.                  character.
  1655.  
  1656. RESULT
  1657.      boolean - 1 if successful, 0 for an error
  1658.  
  1659. EXAMPLE
  1660.      /* sort 'list' and store in 'destvar' */
  1661.      
  1662.      list.0 = 4
  1663.      list.1 = 'Musterfrau|Sabine|Bergstraße 75|12345 Musterdorf'
  1664.      list.2 = 'Poweruser|Heinz|Megabitallee 128|87654 Mipshausen'
  1665.      list.3 = 'Mustermann|Peter|Feldweg 3|35487 Teststadt'
  1666.      list.4 = 'Kohrmeyer|Jürgen|Oststraße 2|49143 Bissendorf'
  1667.      
  1668.      IF QSORT('list','destvar','NUMERIC',4,'|') THEN DO
  1669.         SAY 'Number of elements:' destvar.0
  1670.      
  1671.         DO i = 1 TO destvar.0
  1672.            SAY destvar.i
  1673.         END
  1674.      END
  1675.      
  1676.      /* now sort 'list' directly */
  1677.      
  1678.      IF QSORT('list',,,2,'|') THEN DO
  1679.         DO i = 1 TO list.0
  1680.            SAY list.i
  1681.         END
  1682.      END
  1683.  
  1684. SEE ALSO
  1685.      BSEARCH(), LSEARCH()
  1686.  
  1687. Function BSEARCH()
  1688. ******************
  1689.  
  1690. NAME
  1691.      number = BSEARCH(key,list,start,case)
  1692.  
  1693. ALIAS
  1694.      number = RXTR_BSEARCH(key,list,start,case)
  1695.  
  1696. DESCRIPTION
  1697.      Scan a sorted list and search for a string with Binary Search.  The
  1698.      list must be sorted in ascending order!!!
  1699.  
  1700. ARGUMENTS
  1701.      key     - The string to search for
  1702.      
  1703.      list    - The list to search, must be a compound variable with
  1704.                the following format:
  1705.      
  1706.                list.0 - must be the number of elements in the list
  1707.                list.1 - must be the first element of the list
  1708.                list.2 - must be the second element of the list
  1709.                list.n - must be the n'th element of the list
  1710.      
  1711.      start   - Index of the element to start with searching. If this
  1712.                is omitted, the search starts at element 1.
  1713.      
  1714.      case    - Specifies whether the search should be case sensitive or not.
  1715.                If this is omitted, the search is case insensitive.
  1716.      
  1717.                Possible keywords:
  1718.      
  1719.                'CASE'   or 'C' - search case sensitive
  1720.                'NOCASE' or 'N' - search case insensitive
  1721.  
  1722. RESULT
  1723.      number  - Index of the found element or -1 if nothing was found.
  1724.  
  1725. EXAMPLE
  1726.      /* search for a string with Binary Search */
  1727.      
  1728.      list.0 = 4
  1729.      list.1 = 'Hello'
  1730.      list.2 = 'Good morning'
  1731.      list.3 = 'Bye bye'
  1732.      list.4 = 'Nice to see you'
  1733.      
  1734.      number = BSEARCH('Good morning','list',0,'CASE')
  1735.      
  1736.      IF number ~= (-1) THEN
  1737.         SAY 'Found at number:' number
  1738.      ELSE
  1739.         SAY 'Not found!'
  1740.  
  1741. SEE ALSO
  1742.      QSORT(), LSEARCH()
  1743.  
  1744. Function LSEARCH()
  1745. ******************
  1746.  
  1747. NAME
  1748.      number = LSEARCH(key,list,start,case,pattern)
  1749.  
  1750. ALIAS
  1751.      number = RXTR_LSEARCH(key,list,start,case,pattern)
  1752.  
  1753. DESCRIPTION
  1754.      Scan a sorted list and search for a string with Linear Search.
  1755.  
  1756. ARGUMENTS
  1757.      key     - The string to search for. It is possible to use any
  1758.                AmigaDOS pattern here, in this case you must specify
  1759.                the argument 'pattern'.
  1760.      
  1761.      list    - The list to search, must be a compound variable with
  1762.                the following format:
  1763.      
  1764.                list.0 - must be the number of elements in the list
  1765.                list.1 - must be the first element of the list
  1766.                list.2 - must be the second element of the list
  1767.                list.n - must be the n'th element of the list
  1768.      
  1769.      start   - Index of the element to start with searching. If this
  1770.                is omitted, the search starts at element 1.
  1771.      
  1772.      case    - Specifies whether the search should be case sensitive or not.
  1773.                If this is omitted, the search is case insensitive.
  1774.      
  1775.                Possible keywords:
  1776.      
  1777.                'CASE'   or 'C' - search case sensitive
  1778.                'NOCASE' or 'N' - search case insensitive
  1779.      
  1780.      pattern - Specifies, whether the 'key' argument contains an AmigaDOS
  1781.                pattern or not. If this is omitted, a normal string compare
  1782.                is done.
  1783.      
  1784.                Possible keywords:
  1785.      
  1786.                'PATTERN' or 'P' - Use AmigaDOS pattern match to search
  1787.                'STRCMP'  or 'S' - Use normal string compare to search
  1788.  
  1789. RESULT
  1790.      number  - Index of the next found element or -1 if nothing was found.
  1791.  
  1792. EXAMPLE
  1793.      /* search for a string with Linear Search */
  1794.      
  1795.      list.0 = 4
  1796.      list.1 = 'Hello'
  1797.      list.2 = 'Good morning'
  1798.      list.3 = 'Bye bye'
  1799.      list.4 = 'Nice to see you'
  1800.      
  1801.      number = LSEARCH('Bye bye','list')
  1802.      
  1803.      IF number ~= (-1) THEN
  1804.         SAY 'Found at number:' number
  1805.      ELSE
  1806.         SAY 'Not found!'
  1807.  
  1808. SEE ALSO
  1809.      QSORT(), BSEARCH()
  1810.  
  1811. Function STEMCOPY()
  1812. *******************
  1813.  
  1814. NAME
  1815.      boolean = STEMCOPY(source,start1,dest,start2,number)
  1816.  
  1817. ALIAS
  1818.      boolean = RXTR_STEMCOPY(source,start1,dest,start2,number)
  1819.  
  1820. DESCRIPTION
  1821.      Copies the contents of a compound variable into an other compound
  1822.      variable.
  1823.  
  1824. ARGUMENTS
  1825.      source  - Name of the compound variable to copy from, this variable
  1826.                must have the following format:
  1827.      
  1828.                source.0 - must be the number of elements
  1829.                source.1 - must be the first element
  1830.                source.2 - must be the second element
  1831.                source.n - must be the n'th element
  1832.      
  1833.      start1  - Number of the first 'source' element to copy.
  1834.      
  1835.      dest    - Name of the destination variable.
  1836.      
  1837.      start2  - Number of the first 'dest' element to copy to.
  1838.      
  1839.      number  - Number of elements to copy from 'source' to 'dest'. If this
  1840.                argument is omitted, all elements, beginning at 'start1',
  1841.                are copied.
  1842.  
  1843. RESULT
  1844.      boolean - 1 if successful, 0 for an error
  1845.  
  1846. EXAMPLE
  1847.      /* copy elements of a compound variable */
  1848.      
  1849.      list.0 = 4
  1850.      list.1 = 'Hello'
  1851.      list.2 = 'Good morning'
  1852.      list.3 = 'Bye bye'
  1853.      list.4 = 'Nice to see you'
  1854.      
  1855.      IF STEMCOPY('list',2,'newlist',1,2) THEN DO
  1856.         SAY 'Number of elements in newlist:' newlist.0
  1857.      
  1858.         DO i = 1 TO newlist.0
  1859.            SAY newlist.i
  1860.         END
  1861.      END
  1862.      ELSE
  1863.         SAY 'Error copying list!'
  1864.  
  1865. SEE ALSO
  1866.      STEMINSERT() STEMREMOVE()
  1867.  
  1868. Function STEMINSERT()
  1869. *********************
  1870.  
  1871. NAME
  1872.      boolean = STEMINSERT(stemvar,start,number,default)
  1873.  
  1874. ALIAS
  1875.      boolean = RXTR_STEMINSERT(stemvar,start,number,default)
  1876.  
  1877. DESCRIPTION
  1878.      Inserts one or more elements in a compound variable.
  1879.  
  1880. ARGUMENTS
  1881.      stemvar - Name of the compound variable, this variable must have
  1882.                the following format:
  1883.      
  1884.                stemvar.0 - must be the number of elements
  1885.                stemvar.1 - must be the first element
  1886.                stemvar.2 - must be the second element
  1887.                stemvar.n - must be the n'th element
  1888.      
  1889.      start   - Number of the element to insert.
  1890.      
  1891.      number  - Number of elements to insert. If this is omitted,
  1892.                only one element is inserted.
  1893.      
  1894.      default - Default contents of the inserted elements. If this is
  1895.                omitted, an empty string '' is used.
  1896.  
  1897. RESULT
  1898.      boolean - 1 if successful, 0 for an error
  1899.  
  1900. EXAMPLE
  1901.      /* insert 2 elements before third element */
  1902.      
  1903.      list.0 = 4
  1904.      list.1 = 'Hello'
  1905.      list.2 = 'Good morning'
  1906.      list.3 = 'Bye bye'
  1907.      list.4 = 'Nice to see you'
  1908.      
  1909.      IF STEMINSERT('list',3,2,'New') THEN DO
  1910.         SAY 'New number of elements:' list.0
  1911.      
  1912.         DO i = 1 TO liste.0
  1913.            SAY liste.i
  1914.         END
  1915.      END
  1916.      ELSE
  1917.         SAY 'Error inserting elements!'
  1918.  
  1919. SEE ALSO
  1920.      STEMCOPY() STEMREMOVE()
  1921.  
  1922. Function STEMREMOVE()
  1923. *********************
  1924.  
  1925. NAME
  1926.      boolean = STEMREMOVE(stemvar,start,number)
  1927.  
  1928. ALIAS
  1929.      boolean = RXTR_STEMREMOVE(stemvar,start,number)
  1930.  
  1931. DESCRIPTION
  1932.      Removes one or more elements of a compound variable.
  1933.  
  1934. ARGUMENTS
  1935.      stemvar - Name of the compound variable, this variable must have
  1936.                the following format:
  1937.      
  1938.                stemvar.0 - must be the number of elements
  1939.                stemvar.1 - must be the first element
  1940.                stemvar.2 - must be the second element
  1941.                stemvar.n - must be the n'th element
  1942.      
  1943.      start   - Number of the first element to remove.
  1944.      
  1945.      number  - Number of elements to remove. If this is omitted, only
  1946.                the 'start' element is removed.
  1947.  
  1948. RESULT
  1949.      boolean - 1 if successful, 0 for an error
  1950.  
  1951. EXAMPLE
  1952.      /* remove the third element of a compound variable */
  1953.      
  1954.      list.0 = 4
  1955.      list.1 = 'Hello'
  1956.      list.2 = 'Good morning'
  1957.      list.3 = 'Bye bye'
  1958.      list.4 = 'Nice to see you'
  1959.      
  1960.      IF STEMREMOVE('list',3) THEN DO
  1961.         SAY 'New number of elements:' list.0
  1962.      
  1963.         DO i = 1 TO list.0
  1964.            SAY list.i
  1965.         END
  1966.      END
  1967.      ELSE
  1968.         SAY 'Error removing element!'
  1969.  
  1970. SEE ALSO
  1971.      STEMCOPY() STEMINSERT()
  1972.  
  1973. Function VIEWLIST()
  1974. *******************
  1975.  
  1976. NAME
  1977.      boolean = VIEWLIST(list,window,destvar)
  1978.  
  1979. ALIAS
  1980.      boolean = RXTR_VIEWLIST(list,window,destvar)
  1981.  
  1982. DESCRIPTION
  1983.      Displays a list in a listview window and allows the user to
  1984.      select one or more entries.
  1985.  
  1986. ARGUMENTS
  1987.      list    - A compound variable which contains the list of all
  1988.                selectable entries. This list is displayed in the
  1989.                listview window:
  1990.      
  1991.                list.0 - must be the number of entries in the list
  1992.                list.1 - must be the first entry of the list
  1993.                list.2 - must be the second entry of the list
  1994.                list.n - must be the n'th entry of the list
  1995.      
  1996.      window  - A compound variable, which describes the window:
  1997.      
  1998.                window.title       - The title text of the window. If
  1999.                                     this is not set, the title text is
  2000.                                     'RexxTricks-Listview'.
  2001.      
  2002.                window.postext     - The text for the positive (Okay)
  2003.                                     gadget. Don't use this, use
  2004.                                     window.gadgettext instead!
  2005.      
  2006.                window.negtext     - The text for the negative (Cancel)
  2007.                                     gadget. Don't use this, use
  2008.                                     window.gadgettext instead!
  2009.      
  2010.                window.gadgettext  - String which describes the action
  2011.                                     gadgets, the strings for separate
  2012.                                     gadgets must be separated by '|'.
  2013.                                     You can specify a hotkey charakter
  2014.                                     for each Gadget by preceeding the
  2015.                                     charakter to be used with '_'.
  2016.      
  2017.                                     For example '_Quit|_Save|_Cancel'
  2018.                                     will create 3 gadgets with the
  2019.                                     hotkeys q, s and c.
  2020.      
  2021.                                     If gadgettext is not set, there
  2022.                                     will be 2 gadgets: '_Okay' and
  2023.                                     '_Cancel'
  2024.      
  2025.                window.pubscreen   - Name of the public screen to open
  2026.                                     the window on.
  2027.      
  2028.                                     Default: default public screen
  2029.      
  2030.                window.font        - The font for the window, you can
  2031.                                     specify whether the screen font
  2032.                                     or the system default font should
  2033.                                     be used.
  2034.      
  2035.                                     DEFAULT - use system default font
  2036.                                     SCREEN  - use screen font
  2037.      
  2038.                                     If 'window.font' is not set, the
  2039.                                     system default font is used.
  2040.      
  2041.                window.left        - The left edge of the window. If
  2042.                                     this is not set, the window is
  2043.                                     centered on screen.
  2044.      
  2045.                window.top         - The top edge of the window. If
  2046.                                     this is not set, the window is
  2047.                                     centered on screen.
  2048.      
  2049.                window.width       - The width of the window. If this
  2050.                                     is not set, the window is aligned
  2051.                                     to the minimum width of the gadgets.
  2052.      
  2053.                window.height      - The height of the window. If this
  2054.                                     is not set, the height will be
  2055.                                     3/4 of the screen height.
  2056.      
  2057.                window.zoomleft    - The left edge of the zoomed window.
  2058.                                     If this is not set, 'window.left'
  2059.                                     is used.
  2060.      
  2061.                window.zoomtop     - The top edge of the zoomed window.
  2062.                                     If this is not set, 'window.top'
  2063.                                     is used.
  2064.      
  2065.                window.sort        - Specifies, whether the list should
  2066.                                     be displayed in alphabetical order
  2067.                                     or not.
  2068.      
  2069.                                     TRUE  - display sorted list
  2070.                                     FALSE - do not sort the list
  2071.      
  2072.                                     This is only for displaying, the
  2073.                                     compound variable 'list' will never
  2074.                                     change! If this is not set, the list
  2075.                                     is displayed in alphabetical order.
  2076.      
  2077.                window.multiselect - Enables or disables multiselection.
  2078.      
  2079.                                     TRUE  - multiselection enabled
  2080.                                     FALSE - multiselection disabled
  2081.      
  2082.                                     If this is not set, multiselection
  2083.                                     is enabled.
  2084.      
  2085.      destvar - A compound variable to store the selected entries. The
  2086.                format is similar to the compound variable 'list':
  2087.      
  2088.                destvar.0 - the number of selected entries
  2089.                destvar.1 - the first selected entry
  2090.                destvar.2 - the second selected entry
  2091.                destvar.n - the n'th selected entry
  2092.      
  2093.                When the function exits, you can read the contents with
  2094.                a 'DO i = 1 TO destvar.0' loop. If multiselection is off,
  2095.                you can find the selected entry in 'destvar.1'.
  2096.      
  2097.                There is a another field in this compound variable:
  2098.                --------------------------------------------------
  2099.                destvar.gadget - The number of the action gadget, on
  2100.                                 which the user has clicked to close the
  2101.                                 window. The gadgets are numbered from
  2102.                                 the left to the right, beginning with 1.
  2103.                                 The rightmost gadget (Cancel), and also
  2104.                                 the close gadget of the window, sets
  2105.                                 destvar.gadget to 0.
  2106.  
  2107. RESULT
  2108.      boolean - 1 if at least one entry was selected
  2109.                0 if no entries are selected or for an error
  2110.  
  2111. EXAMPLE
  2112.      /* Open listview window and display all selected entries */
  2113.      
  2114.      list.0 = 4
  2115.      list.1 = 'Hello'
  2116.      list.2 = 'Good morning'
  2117.      list.3 = 'Bye bye'
  2118.      list.4 = 'Nice to see you'
  2119.      
  2120.      window.title      = 'Please select'
  2121.      window.gadgettext = '_Yes|_Use|_Edit|_Cancel'
  2122.      window.pubscreen  = 'MICRODOT'
  2123.      window.font       = 'SCREEN'
  2124.      window.sort       = 'TRUE'
  2125.      
  2126.      IF VIEWLIST('list','window','destvar') THEN DO
  2127.         SAY 'Number of selected entries   :' destvar.0
  2128.         SAY 'Number of the selected gadget:' destvar.gadget
  2129.      
  2130.         DO i = 1 TO destvar.0
  2131.            SAY destvar.i
  2132.         END
  2133.      END
  2134.  
  2135. SEE ALSO
  2136.      The VIEWLIST() window
  2137.  
  2138. Function BEEP()
  2139. ***************
  2140.  
  2141. NAME
  2142.      dummy = BEEP()
  2143.  
  2144. ALIAS
  2145.      dummy = RXTR_BEEP()
  2146.  
  2147. DESCRIPTION
  2148.      Beep all screens.
  2149.  
  2150. ARGUMENTS
  2151.      -/-
  2152.  
  2153. RESULT
  2154.      dummy - 1
  2155.  
  2156. EXAMPLE
  2157.      /* Beep screens */
  2158.      
  2159.      dummy = BEEP()
  2160.  
  2161. SEE ALSO
  2162.      -/-
  2163.  
  2164. Function GETDEFAULTPUBSCREEN()
  2165. ******************************
  2166.  
  2167. NAME
  2168.      screen = GETDEFAULTPUBSCREEN()
  2169.  
  2170. ALIAS
  2171.      screen = RXTR_GETDEFAULTPUBSCREEN()
  2172.  
  2173. DESCRIPTION
  2174.      Returns the name of the default public screen.
  2175.  
  2176. ARGUMENTS
  2177.      -/-
  2178.  
  2179. RESULT
  2180.      screen - Name of the current default public screen.
  2181.  
  2182. EXAMPLE
  2183.      /* Get default public screen */
  2184.      
  2185.      screen = GETDEFAULTPUBSCREEN()
  2186.      SAY 'Default public screen is:' screen
  2187.  
  2188. SEE ALSO
  2189.      SETDEFAULTPUBSCREEN(), PUBSCREENLIST()
  2190.  
  2191. Function SETDEFAULTPUBSCREEN()
  2192. ******************************
  2193.  
  2194. NAME
  2195.      oldscreen = SETDEFAULTPUBSCREEN(newscreen)
  2196.  
  2197. ALIAS
  2198.      oldscreen = RXTR_SETDEFAULTPUBSCREEN(newscreen)
  2199.  
  2200. DESCRIPTION
  2201.      Sets a new default public screen, the name of the old screen is
  2202.      returned.
  2203.  
  2204. ARGUMENTS
  2205.      newscreen - Name of the new default public screen. If this is omitted,
  2206.                  the screen 'Workbench' is used.
  2207.  
  2208. RESULT
  2209.      oldscreen - Name of the old default public screen.
  2210.  
  2211. EXAMPLE
  2212.      /* Set the screen of Cygnus ED as default public screen */
  2213.      
  2214.      oldscreen = SETDEFAULTPUBSCREEN('CygnusEdScreen1')
  2215.      SAY 'Old default public screen was:' oldscreen
  2216.  
  2217. SEE ALSO
  2218.      GETDEFAULTPUBSCREEN(), PUBSCREENLIST()
  2219.  
  2220. Function GETPUBSCREENMODES()
  2221. ****************************
  2222.  
  2223. NAME
  2224.      publicmodes = GETPUBSCREENMODES()
  2225.  
  2226. ALIAS
  2227.      publicmodes = RXTR_GETPUBSCREENMODES()
  2228.  
  2229. DESCRIPTION
  2230.      Returns the global intuition public screen modes.
  2231.  
  2232. ARGUMENTS
  2233.      -/-
  2234.  
  2235. RESULT
  2236.      publicmodes - A string of two characters. The first character
  2237.                    represents the SHANGHAI mode, the second character
  2238.                    represents the POPPUBSCREEN mode.
  2239.      
  2240.                    If SHANGHAI mode is on, all workbench windows
  2241.                    are opened on the default public screen.
  2242.      
  2243.                    If POPPUBSCREEN mode is on, a public screen pops to the
  2244.                    front of the display when a window opens on the screen.
  2245.      
  2246.                    -- SHANGHAI and POPPUBSCREEN off
  2247.      
  2248.                    S- SHANGHAI on
  2249.      
  2250.                    -P POPPUBSCREEN on
  2251.      
  2252.                    SP SHANGHAI and POPPUBSCREEN on
  2253.  
  2254. EXAMPLE
  2255.      /* Get current public screen modes */
  2256.      
  2257.      publicmodes = GETPUBSCREENMODES()
  2258.      SAY 'Pubscreen modes:' publicmodes
  2259.  
  2260. SEE ALSO
  2261.      SETPUBSCREENMODES()
  2262.  
  2263. Function SETPUBSCREENMODES()
  2264. ****************************
  2265.  
  2266. NAME
  2267.      oldmodes = SETPUBSCREENMODES(publicmodes)
  2268.  
  2269. ALIAS
  2270.      oldmodes = RXTR_SETPUBSCREENMODES(publicmodes)
  2271.  
  2272. DESCRIPTION
  2273.      Sets the global intuition public screen modes.
  2274.  
  2275. ARGUMENTS
  2276.      publicmodes - A string of two characters. The first character
  2277.                    represents the SHANGHAI mode, the second character
  2278.                    represents the POPPUBSCREEN mode.
  2279.      
  2280.                    If SHANGHAI mode is on, all workbench windows
  2281.                    are opened on the default public screen.
  2282.      
  2283.                    If POPPUBSCREEN mode is on, a public screen pops to the
  2284.                    front of the display when a window opens on the screen.
  2285.      
  2286.                    -- SHANGHAI and POPPUBSCREEN off
  2287.      
  2288.                    S- SHANGHAI on
  2289.      
  2290.                    -P POPPUBSCREEN on
  2291.      
  2292.                    SP SHANGHAI and POPPUBSCREEN on
  2293.  
  2294. RESULT
  2295.      oldmodes    - The old public screen modes.
  2296.  
  2297. EXAMPLE
  2298.      /* Turn on SHANGHAI mode, and turn off POPPUBSCREEN mode */
  2299.      
  2300.      oldmodes = SETPUBSCREENMODES('S-')
  2301.      SAY 'Old public screen modes:' oldmodes
  2302.  
  2303. SEE ALSO
  2304.      GETPUBSCREENMODES()
  2305.  
  2306. Function PUBSCREENTOFRONT()
  2307. ***************************
  2308.  
  2309. NAME
  2310.      boolean = PUBSCREENTOFRONT(screen)
  2311.  
  2312. ALIAS
  2313.      boolean = RXTR_PUBSCREENTOFRONT(screen)
  2314.  
  2315. DESCRIPTION
  2316.      Brings a public screen to the front of the display.
  2317.  
  2318. ARGUMENTS
  2319.      screen  - Name of the public screen
  2320.  
  2321. RESULT
  2322.      boolean - 1 if successful, 0 for an error
  2323.  
  2324. EXAMPLE
  2325.      /* Bring the screen of Cygnus ED to the front */
  2326.      
  2327.      IF PUBSCREENTOFRONT('CygnusEdScreen1') THEN
  2328.         SAY 'Cygnus ED is in front of the display!'
  2329.      ELSE
  2330.         SAY 'Error, cannot bring Cygnus ED to the front!'
  2331.  
  2332. SEE ALSO
  2333.      PUBSCREENTOBACK()
  2334.  
  2335. Function PUBSCREENTOBACK()
  2336. **************************
  2337.  
  2338. NAME
  2339.      boolean = PUBSCREENTOBACK(screen)
  2340.  
  2341. ALIAS
  2342.      boolean = RXTR_PUBSCREENTOBACK(screen)
  2343.  
  2344. DESCRIPTION
  2345.      Sends a public screen to the back of the display.
  2346.  
  2347. ARGUMENTS
  2348.      screen  - Name of the public screen
  2349.  
  2350. RESULT
  2351.      boolean - 1 if successful, 0 for an error
  2352.  
  2353. EXAMPLE
  2354.      /* Send workbench screen to the back */
  2355.      
  2356.      IF PUBSCREENTOBACK('Workbench') THEN
  2357.         SAY 'Workbench is in the back of the display!'
  2358.      ELSE
  2359.         SAY 'Error, cannot send workbench screen to the back!'
  2360.  
  2361. SEE ALSO
  2362.      PUBSCREENTOFRONT()
  2363.  
  2364. Function PUBSCREENLIST()
  2365. ************************
  2366.  
  2367. NAME
  2368.      boolean = PUBSCREENLIST(destvar)
  2369.  
  2370. ALIAS
  2371.      boolean = RXTR_PUBSCREENLIST(destvar)
  2372.  
  2373. DESCRIPTION
  2374.      Creates a list of all public screens currently open.
  2375.  
  2376. ARGUMENTS
  2377.      destvar - Compound variable to store the public screen names,
  2378.                the names are stored as follows:
  2379.      
  2380.                destvar.0 - the number of public screens
  2381.                destvar.1 - the name of the first public screen
  2382.                destvar.2 - the name of the second public screen
  2383.                destvar.n - the name of the n'th public screen
  2384.  
  2385. RESULT
  2386.      boolean - 1 if successful, 0 for an error
  2387.  
  2388. EXAMPLE
  2389.      /* Display a list of all public screens */
  2390.      
  2391.      IF PUBSCREENLIST('screenlist') THEN DO
  2392.         SAY 'Number of public screens:' screenlist.0
  2393.         DO i = 1 TO screenlist.0
  2394.            SAY screenlist.i
  2395.         END
  2396.      END
  2397.  
  2398. SEE ALSO
  2399.      GETDEFAULTPUBSCREEN(), SETDEFAULTPUBSCREEN()
  2400.  
  2401. Function GETTOOLTYPEVALUE()
  2402. ***************************
  2403.  
  2404. NAME
  2405.      value = GETTOOLTYPEVALUE(filename,keyword)
  2406.  
  2407. ALIAS
  2408.      value = RXTR_GETTOOLTYPEVALUE(filename,keyword)
  2409.  
  2410. DESCRIPTION
  2411.      Returns the value of a tooltype. Tooltype Format is <keyword>=<value>
  2412.  
  2413. ARGUMENTS
  2414.      filename - Name of the icon file, without suffix '.info'!!!
  2415.  
  2416.      keyword  - Keyword of the tooltype to search for
  2417.  
  2418. RESULT
  2419.      value    - The value associated with the specified keyword or an
  2420.                 empty string '' if the keyword has no value. If the
  2421.                 keyword or the icon doesn't exist, value will be an
  2422.                 empty string '' too. In this case, the variable RC
  2423.                 is set to 10.
  2424.  
  2425. EXAMPLE
  2426.      /* Get hotkey of CrossDOS commodity */
  2427.      
  2428.      hotkey = GETTOOLTYPEVALUE('SYS:Wbstartup/CrossDOS','CX_POPKEY')
  2429.      
  2430.      IF hotkey ~= '' THEN
  2431.         SAY 'Hotkey is:' hotkey
  2432.      ELSE DO
  2433.         IF RC = 0 THEN
  2434.            SAY 'Tooltype 'CX_POPKEY' has no value!'
  2435.         ELSE
  2436.            SAY 'Icon or Tooltype doesn't exist!'
  2437.      END
  2438.  
  2439. SEE ALSO
  2440.      SETTOOLTYPEVALUE(), GETTOOLTYPES(), SETTOOLTYPES()
  2441.  
  2442. Function SETTOOLTYPEVALUE()
  2443. ***************************
  2444.  
  2445. NAME
  2446.      boolean = SETTOOLTYPEVALUE(filename,keyword,value)
  2447.  
  2448. ALIAS
  2449.      boolean = RXTR_SETTOOLTYPEVALUE(filename,keyword,value)
  2450.  
  2451. DESCRIPTION
  2452.      Creates a tooltype entry <keyword>=<value> and stores it in the icon,
  2453.      an existing entry will be replaced.
  2454.  
  2455. ARGUMENTS
  2456.      filename - Name of the icon file, without suffix '.info'!!!
  2457.      
  2458.      keyword  - The keyword of the tooltype entry
  2459.      
  2460.      value    - The value of the tooltype entry, you can specify an empty
  2461.                 string to set the keyword as entry without value.
  2462.  
  2463. RESULT
  2464.      boolean  - 1 if successful, 0 for an error
  2465.  
  2466. EXAMPLE
  2467.      /* Set the hotkey of CrossDOS commodity */
  2468.      
  2469.      IF SETTOOLTYPEVALUE('SYS:Wbstartup/CrossDOS','CX_POPKEY','alt f1') THEN
  2470.         SAY 'Hotkey is set to <alt f1>!'
  2471.      ELSE
  2472.         SAY 'Error setting the hotkey!'
  2473.  
  2474. SEE ALSO
  2475.      GETTOOLTYPEVALUE(), GETTOOLTYPES(), SETTOOLTYPES()
  2476.  
  2477. Function GETTOOLTYPES()
  2478. ***********************
  2479.  
  2480. NAME
  2481.      boolean = GETTOOLTYPES(filename,stemvar)
  2482.  
  2483. ALIAS
  2484.      boolean = RXTR_GETTOOLTYPES(filename,stemvar)
  2485.  
  2486. DESCRIPTION
  2487.      Creates a list of all tooltype entries stored in the icon.
  2488.  
  2489. ARGUMENTS
  2490.      filename - Name of the icon file, without suffix '.info'!!!
  2491.      
  2492.      stemvar  - Compound variable to store the tooltype entries, each
  2493.                 element will be one entry:
  2494.      
  2495.                 stemvar.0 - the number of tooltype entries
  2496.                 stemvar.1 - the first tooltype entry
  2497.                 stemvar.2 - the second tooltype entry
  2498.                 stemvar.n - the n'th tooltype entry
  2499.  
  2500. RESULT
  2501.      boolean  - 1 if successful, 0 for an error
  2502.  
  2503. EXAMPLE
  2504.      /* Get all tooltypes of the CrossDOS commodity */
  2505.      
  2506.      IF GETTOOLTYPES('SYS:Wbstartup/CrossDOS','tooltypes') THEN DO
  2507.         SAY 'Number of tooltypes:' tooltypes.0
  2508.         SAY
  2509.      
  2510.         DO i = 1 TO tooltypes.0
  2511.            SAY tooltypes.i
  2512.         END
  2513.      END
  2514.      ELSE
  2515.         SAY 'Error reading tooltypes!'
  2516.  
  2517. SEE ALSO
  2518.      SETTOOLTYPES(), GETTOOLTYPEVALUE(), SETTOOLTYPEVALUE()
  2519.  
  2520. Function SETTOOLTYPES()
  2521. ***********************
  2522.  
  2523. NAME
  2524.      boolean = SETTOOLTYPES(filename,tooltypes)
  2525.  
  2526. ALIAS
  2527.      boolean = RXTR_SETTOOLTYPES(filename,tooltypes)
  2528.  
  2529. DESCRIPTION
  2530.      Sets the tooltype entries of an icon, all existing entries will be
  2531.      removed.
  2532.  
  2533. ARGUMENTS
  2534.      filename  - Name of the icon file, without suffix '.info'!!!
  2535.      
  2536.      tooltypes - Compound variable which contents the new tooltype entries,
  2537.                  this variable must have the following format:
  2538.      
  2539.                  tooltypes.0 - must be the number of tooltype entries
  2540.                  tooltypes.1 - must be the first entry
  2541.                  tooltypes.2 - must be the second entry
  2542.                  tooltypes.n - must be the n'th entry
  2543.  
  2544. RESULT
  2545.      boolean   - 1 if successful, 0 for an error
  2546.  
  2547. EXAMPLE
  2548.      /* Set tooltypes of the CrossDOS commodity */
  2549.      
  2550.      tooltypes.0 = 6
  2551.      tooltypes.1 = '«PC0,FILTER,TRANS,INTL.crossdos»'
  2552.      tooltypes.2 = '«PC1,FILTER,TRANS,INTL.crossdos»'
  2553.      tooltypes.3 = 'DONOTWAIT'
  2554.      tooltypes.4 = 'CX_POPUP=NO'
  2555.      tooltypes.5 = 'CX_PRIORITY=0'
  2556.      tooltypes.6 = 'CX_POPKEY=ctrl alt c'
  2557.      
  2558.      IF SETTOOLTYPES('SYS:Wbstartup/CrossDOS','tooltypes') THEN
  2559.         SAY 'New tooltypes are set!'
  2560.      ELSE
  2561.         SAY 'Error setting tooltypes!'
  2562.  
  2563. SEE ALSO
  2564.      SETTOOLTYPES(), GETTOOLTYPEVALUE(), SETTOOLTYPEVALUE()
  2565.  
  2566. Function GETDEFAULTTOOL()
  2567. *************************
  2568.  
  2569. NAME
  2570.      defaulttool = GETDEFAULTTOOL(filename)
  2571.  
  2572. ALIAS
  2573.      defaulttool = RXTR_GETDEFAULTTOOL(filename)
  2574.  
  2575. DESCRIPTION
  2576.      Returns the default tool of a project or disk icon. All other icon
  2577.      types have no default tool, then an empty string is returned.
  2578.  
  2579. ARGUMENTS
  2580.      filename    - Name of the icon file, without suffix '.info'!!!
  2581.  
  2582. RESULT
  2583.      defaulttool - The default tool of the icon. The function will return
  2584.                    an empty string '' if no default tool is set or for
  2585.                    an error. If an error occurs, the variable RC
  2586.                    is set to 10.
  2587.  
  2588. EXAMPLE
  2589.      /* Get default tool of the boot disk */
  2590.      
  2591.      prg = GETDEFAULTTOOL('SYS:disk')
  2592.      
  2593.      IF prg ~= '' THEN
  2594.         SAY 'Default tool is:' prg
  2595.      ELSE DO
  2596.         IF RC = 0 THEN
  2597.            SAY 'No default tool found!'
  2598.         ELSE
  2599.            SAY 'Error, cannot get default tool!'
  2600.      END
  2601.  
  2602. SEE ALSO
  2603.      SETDEFAULTTOOL()
  2604.  
  2605. Function SETDEFAULTTOOL()
  2606. *************************
  2607.  
  2608. NAME
  2609.      boolean = SETDEFAULTTOOL(filename,defaulttool)
  2610.  
  2611. ALIAS
  2612.      boolean = RXTR_SETDEFAULTTOOL(filename,defaulttool)
  2613.  
  2614. DESCRIPTION
  2615.      Sets the default tool of a project, or disk icon.
  2616.  
  2617. ARGUMENTS
  2618.      filename    - Name of the icon file, without suffix '.info'!!!
  2619.  
  2620.      defaulttool - The new default tool.
  2621.  
  2622. RESULT
  2623.      boolean     - 1 if successful, 0 for an error
  2624.  
  2625. EXAMPLE
  2626.      /* Set default tool of the boot disk */
  2627.      
  2628.      IF SETDEFAULTTOOL('SYS:disk','SYS:System/DiskCopy') THEN
  2629.         SAY 'Default tool is set!'
  2630.      ELSE
  2631.         SAY 'Error, cannot set default tool!'
  2632.  
  2633. SEE ALSO
  2634.      GETDEFAULTTOOL()
  2635.  
  2636. Function GETSTACK()
  2637. *******************
  2638.  
  2639. NAME
  2640.      stacksize = GETSTACK(filename)
  2641.  
  2642. ALIAS
  2643.      stacksize = RXTR_GETSTACK(filename)
  2644.  
  2645. DESCRIPTION
  2646.      Returns the stacksize of a tool or project icon. All other icon
  2647.      types have no stacksize, then an empty string is returned.
  2648.  
  2649. ARGUMENTS
  2650.      filename  - Name of the icon file, without suffix '.info'!!!
  2651.  
  2652. RESULT
  2653.      stacksize - The stacksize of the icon. The function will return
  2654.                  an empty string '' if the icon has no stacksize entry
  2655.                  or for an error. If an error occurs, the variable RC
  2656.                  is set to 10.
  2657.  
  2658. EXAMPLE
  2659.      /* Get stacksize of CrossDOS commodity */
  2660.      
  2661.      stack = GETSTACK('SYS:Wbstartup/CrossDOS')
  2662.      
  2663.      IF stack ~= '' THEN
  2664.         SAY 'Stacksize is' stack 'bytes!'
  2665.      ELSE DO
  2666.         IF RC = 0 THEN
  2667.            SAY 'No stacksize found!'
  2668.         ELSE
  2669.            SAY 'Error, cannot get stacksize!'
  2670.      END
  2671.  
  2672. SEE ALSO
  2673.      SETSTACK()
  2674.  
  2675. Function SETSTACK()
  2676. *******************
  2677.  
  2678. NAME
  2679.      boolean = SETSTACK(filename,stacksizee)
  2680.  
  2681. ALIAS
  2682.      boolean = RXTR_SETSTACK(filename,stacksize)
  2683.  
  2684. DESCRIPTION
  2685.      Sets the stacksize of a tool, or project icon.
  2686.  
  2687. ARGUMENTS
  2688.      filename  - Name of the icon file, without suffix '.info'!!!
  2689.  
  2690.      stacksize - The new stacksize.
  2691.  
  2692. RESULT
  2693.      boolean   - 1 if successful, 0 for an error
  2694.  
  2695. EXAMPLE
  2696.      /* Set stacksize of CrossDOS commodity */
  2697.      
  2698.      IF SETSTACK('SYS:Wbstartup/CrossDOS',10240) THEN
  2699.         SAY 'Stacksize is set to 10240 bytes!'
  2700.      ELSE
  2701.         SAY 'Error, cannot set stacksize!'
  2702.  
  2703. SEE ALSO
  2704.      GETSTACK()
  2705.  
  2706. Function CREATEICON()
  2707. *********************
  2708.  
  2709. NAME
  2710.      boolean = CREATEICON(filename,sourceicon,tooltypes,defaulttool,stacksize)
  2711.  
  2712. ALIAS
  2713.      boolean = RXTR_CREATEICON(filename,sourceicon,tooltypes,defaulttool,stacksize)
  2714.  
  2715. DESCRIPTION
  2716.      Creates a new icon, type and images are taken from the source icon.
  2717.  
  2718. ARGUMENTS
  2719.      filename    - Name of the new icon, without suffix '.info'!!!
  2720.      
  2721.      sourceicon  - Name of the source icon, without suffix '.info'!!!
  2722.                    Icon type and images of this icon are used to create
  2723.                    the new icon.
  2724.      
  2725.      tooltypes   - Compound variable which contents the tooltype entries.
  2726.                    If this is omitted, all tooltypes of the source icon
  2727.                    are copied into the new icon. This variable must have
  2728.                    the following format:
  2729.      
  2730.                    tooltypes.0 - must be the number of tooltype entries
  2731.                    tooltypes.1 - must be the first entry
  2732.                    tooltypes.2 - must be the second entry
  2733.                    tooltypes.n - must be the n'th entry
  2734.      
  2735.      defaulttool - The default tool of the new icon. If this is omitted,
  2736.                    the default tool of the source icon is used.
  2737.      
  2738.      stacksize   - The stacksize of the new icon. If this is omitted, the
  2739.                    stacksize of the source icon is used.
  2740.  
  2741. RESULT
  2742.      boolean     - 1 if successful, 0 for an error
  2743.  
  2744. EXAMPLE
  2745.      /* Create a project icon for a textfile */
  2746.      
  2747.      tooltypes.0 = 1
  2748.      tooltypes.1 = 'FILETYPE=Text'
  2749.      
  2750.      IF CREATEICON('DH0:Text.txt','ENV:sys/def_Project','tooltypes','C:Ed',8192) THEN
  2751.         SAY 'Icon created successfully!'
  2752.      ELSE
  2753.         SAY 'Error creating the icon!'
  2754.  
  2755. SEE ALSO
  2756.      -/-
  2757.  
  2758. Function WBINFO()
  2759. *****************
  2760.  
  2761. NAME
  2762.      boolean = WBINFO(filename,pubscreen)
  2763.  
  2764. ALIAS
  2765.      boolean = RXTR_WBINFO(filename,pubscreen)
  2766.  
  2767. DESCRIPTION
  2768.      Calls the icon information window from workbench and opens it on a
  2769.      public screen.
  2770.  
  2771. ARGUMENTS
  2772.      filename  - Name of the icon to edit, without suffix '.info'!!!
  2773.      
  2774.      pubscreen - Name of a public screen to open the window on. If this
  2775.                  is omitted, the default public screen is used.
  2776.  
  2777. RESULT
  2778.      boolean   - 1 if successful, 0 for an error
  2779.  
  2780. EXAMPLE
  2781.      /* Edit icon of the CrossDOS commodity on the CygnusEd screen */
  2782.      
  2783.      IF WBINFO('SYS:Wbstartup/CrossDOS','CygnusEdScreen1') THEN
  2784.         SAY 'Okay, no errors!'
  2785.      ELSE
  2786.         SAY 'Error, cannot open the window!'
  2787.  
  2788. SEE ALSO
  2789.      -/-
  2790.  
  2791. Function WHATIS()
  2792. *****************
  2793.  
  2794. NAME
  2795.      type = WHATIS(filename)
  2796.  
  2797. ALIAS
  2798.      type = RXTR_WHATIS(filename)
  2799.  
  2800. DESCRIPTION
  2801.      Recognizes the type of a file using 'whatis.library V4.0+' and returns
  2802.      the description string of the filetype.
  2803.  
  2804. ARGUMENTS
  2805.      filename - Name of the file
  2806.  
  2807. RESULT
  2808.      type     - A string which describes the type of the file. You can
  2809.                 get a list of all possible filetypes with WHATISTYPES().
  2810.  
  2811. EXAMPLE
  2812.      /* Recognize the type of 'S:User-Startup' */
  2813.      
  2814.      type = WHATIS('S:User-Startup')
  2815.      SAY 'Filetype of S:User-Startup is:' type
  2816.  
  2817. SEE ALSO
  2818.      WHATISTYPES()
  2819.  
  2820. Function WHATISTYPES()
  2821. **********************
  2822.  
  2823. NAME
  2824.      boolean = WHATISTYPES(destvar)
  2825.  
  2826. ALIAS
  2827.      boolean = RXTR_WHATISTYPES(destvar)
  2828.  
  2829. DESCRIPTION
  2830.      Scans 'whatis.library' for all currently known filetypes and stores
  2831.      the description strings in a compound variable.
  2832.  
  2833. ARGUMENTS
  2834.      destvar - Compound variable to store the description strings
  2835.                of the filetypes:
  2836.      
  2837.                destvar.0 - the number of filetypes
  2838.                destvar.1 - description string of the first filetype
  2839.                destvar.2 - description string of the second filetype
  2840.                destvar.n - description string of the n'th filetype
  2841.  
  2842. RESULT
  2843.      boolean - 1 if successful, 0 for an error
  2844.  
  2845. EXAMPLE
  2846.      /* Display all filetypes of 'whatis.library' */
  2847.      
  2848.      IF WHATISTYPES('destvar') THEN DO
  2849.         SAY 'Number of filetypes:' destvar.0
  2850.         DO i = 1 TO destvar.0
  2851.            SAY destvar.i
  2852.         END
  2853.      END
  2854.  
  2855. SEE ALSO
  2856.      WHATIS()
  2857.  
  2858. Function FILEID_IDENTIFY()
  2859. **************************
  2860.  
  2861. NAME
  2862.      type = FILEID_IDENTIFY(filename,mode)
  2863.  
  2864. ALIAS
  2865.      type = RXTR_FILEID_IDENTIFY(filename,mode)
  2866.  
  2867. DESCRIPTION
  2868.      Recognizes the type of a file using 'FileID.library V7.0+' and returns
  2869.      the description string or the ID number of the filetype.
  2870.  
  2871. ARGUMENTS
  2872.      filename - Name of the file
  2873.      
  2874.      mode     - Specifies whether the description string or the ID
  2875.                 number of the filetype should be returned.
  2876.      
  2877.                 Possible keywords:
  2878.      
  2879.                 'DESCRIPTION' or 'D' - Result is the description string
  2880.                                        of the filetype
  2881.      
  2882.                 'ID' or 'I'          - Result is the ID number of the
  2883.                                        filetype
  2884.      
  2885.                                        See FILEID_GETHIGHID().
  2886.                                        See FILEID_GETIDSTRING().
  2887.      
  2888.                 If this argument is omitted, the description string is
  2889.                 returned.
  2890.  
  2891. RESULT
  2892.      type     - The filetype, depending on the 'mode' argument.
  2893.  
  2894. EXAMPLE
  2895.      /* Recognize teh type of 'LIBS:rexxtricks.library' */
  2896.      
  2897.      type = FILEID_IDENTIFY('LIBS:rexxtricks.library','ID')
  2898.      SAY 'Filetype ID of LIBS:rexxtricks.library is:' type
  2899.      
  2900.      type = FILEID_IDENTIFY('LIBS:rexxtricks.library')
  2901.      SAY 'Filetype description of LIBS:rexxtricks.library is:' type
  2902.  
  2903. SEE ALSO
  2904.      FILEID_GETHIGHID() FILEID_GETIDSTRING() FILEID_GETTYPES()
  2905.  
  2906. Function FILEID_GETHIGHID()
  2907. ***************************
  2908.  
  2909. NAME
  2910.      id = FILEID_GETHIGHID()
  2911.  
  2912. ALIAS
  2913.      id = RXTR_FILEID_GETHIGHID()
  2914.  
  2915. DESCRIPTION
  2916.      Returns the maximum filetype ID number of 'FileID.library', this is
  2917.      also the number of known filetypes.
  2918.  
  2919. ARGUMENTS
  2920.      -/-
  2921.  
  2922. RESULT
  2923.      id - Maximum ID number and number of known filetypes
  2924.  
  2925. EXAMPLE
  2926.      /* Display number of known filetypes */
  2927.      
  2928.      SAY 'Number of filetypes:' FILEID_GETHIGHID()
  2929.  
  2930. SEE ALSO
  2931.      FILEID_IDENTIFY() FILEID_GETIDSTRING() FILEID_GETTYPES()
  2932.  
  2933. Function FILEID_GETIDSTRING()
  2934. *****************************
  2935.  
  2936. NAME
  2937.      string = FILEID_GETIDSTRING(id)
  2938.  
  2939. ALIAS
  2940.      string = RXTR_FILEID_GETIDSTRING(id)
  2941.  
  2942. DESCRIPTION
  2943.      Returns the description string of a filetype ID.
  2944.  
  2945. ARGUMENTS
  2946.      id     - The ID number of the filetype
  2947.  
  2948. RESULT
  2949.      string - The description string of the specified ID number
  2950.  
  2951. EXAMPLE
  2952.      /* Display description of ID 25 */
  2953.      
  2954.      SAY 'ID number 25 is:' FILEID_GETIDSTRING(25)
  2955.  
  2956. SEE ALSO
  2957.      FILEID_IDENTIFY() FILEID_GETHIGHID() FILEID_GETTYPES()
  2958.  
  2959. Function FILEID_GETTYPES()
  2960. **************************
  2961.  
  2962. NAME
  2963.      boolean = FILEID_GETTYPES(destvar)
  2964.  
  2965. ALIAS
  2966.      boolean = RXTR_FILEID_GETTYPES(destvar)
  2967.  
  2968. DESCRIPTION
  2969.      Scans 'FileID.library' for all currently known filetypes and stores
  2970.      the description strings in a compound variable.
  2971.  
  2972. ARGUMENTS
  2973.      destvar - Compound variable to store the description strings
  2974.                of the filetypes:
  2975.      
  2976.                destvar.0 - the number of filetypes
  2977.                destvar.1 - description string of the filetype ID 1
  2978.                destvar.2 - description string of the filetype ID 2
  2979.                destvar.n - description string of the filetype ID n
  2980.      
  2981.                The description string of ID number 0 cannot be stored
  2982.                because 'destvar.0' contains the number of filetypes!
  2983.      
  2984.                The description of filetype 0 is: 'unknown data file'.
  2985.  
  2986. RESULT
  2987.      boolean - 1 if successful, 0 for an error
  2988.  
  2989. EXAMPLE
  2990.      /* Display all filetypes of 'FileID.library' */
  2991.      
  2992.      IF FILEID_GETTYPES('destvar') THEN DO
  2993.         SAY 'Number of filetypes:' destvar.0
  2994.         DO i = 1 TO destvar.0
  2995.            SAY RIGHT(i,4) destvar.i
  2996.         END
  2997.      END
  2998.  
  2999. SEE ALSO
  3000.      FILEID_IDENTIFY() FILEID_GETHIGHID() FILEID_GETIDSTRING()
  3001.  
  3002. Function CRC32()
  3003. ****************
  3004.  
  3005. NAME
  3006.      crc = CRC32(filename,verbose)
  3007.  
  3008. ALIAS
  3009.      crc = RXTR_CRC32(filename,verbose)
  3010.  
  3011. DESCRIPTION
  3012.      Calculates the 32-Bit CRC checksum of a file.
  3013.  
  3014. ARGUMENTS
  3015.      filename - Name of the file
  3016.      
  3017.      verbose  - Specifies the format of the result 'crc'.
  3018.      
  3019.                 Possible keywords are 'VERBOSE' or 'V', if this is
  3020.                 specified 'crc' is a string of four words:
  3021.      
  3022.                    1. word - checksum hexadecimal
  3023.                    2. word - checksum decimal
  3024.                    3. word - complement of the checksum hexadecimal
  3025.                    4. word - complement of the checksum decimal
  3026.      
  3027.                 If this argument is omitted, 'crc' is the hexadecimal
  3028.                 complement of the checksum.
  3029.  
  3030. RESULT
  3031.      crc      - Checksum of the file depending on the 'verbose' argument.
  3032.  
  3033. EXAMPLE
  3034.      /* Calculate the checksum of 'S:User-Startup' */
  3035.      
  3036.      crc = CRC32('S:User-Startup')
  3037.      SAY 'Checksum =' crc
  3038.  
  3039. SEE ALSO
  3040.      -/-
  3041.  
  3042. Function COUNTCHARS()
  3043. *********************
  3044.  
  3045. NAME
  3046.      count = COUNTCHARS(string,characters)
  3047.  
  3048. ALIAS
  3049.      count = RXTR_COUNTCHARS(string,characters)
  3050.  
  3051. DESCRIPTION
  3052.      Counts the number of occurances of the specified characters in the
  3053.      string. The search is case sensitive.
  3054.  
  3055. ARGUMENTS
  3056.      string     - The string in which the characters should be searched
  3057.      
  3058.      characters - The characters to count
  3059.  
  3060. RESULT
  3061.      count      - The number of occurances of the specified 'characters'
  3062.                   in the 'string':
  3063.      
  3064.                   COUNTCHARS('aa,bb,cc,dd,ee','c,') returns 6
  3065.                   COUNTCHARS('aa,bb,cc,dd,ee',',')  returns 4
  3066.                   COUNTCHARS('aa,bb,cc,dd,ee','c')  returns 2
  3067.  
  3068. EXAMPLE
  3069.      /* Count chars in a string */
  3070.      
  3071.      count = COUNTCHARS('Halli, hallo!','hH')
  3072.      SAY 'The characters h and H are' count 'times in the string.'
  3073.  
  3074. SEE ALSO
  3075.      -/-
  3076.  
  3077. Function RAND()
  3078. ***************
  3079.  
  3080. NAME
  3081.      integer = RAND(min,max)
  3082.  
  3083. ALIAS
  3084.      integer = RXTR_RAND(min,max)
  3085.  
  3086. DESCRIPTION
  3087.      Returns a random number.
  3088.  
  3089. ARGUMENTS
  3090.      min     - The minimal possible number
  3091.      
  3092.      max     - The maximal possible number
  3093.  
  3094. RESULT
  3095.      integer - A random number between 'min' and 'max'
  3096.  
  3097. EXAMPLE
  3098.      /* Display random numbers between 1 and 100 */
  3099.      
  3100.      DO i = 1 TO 20
  3101.         SAY RAND(1,100)
  3102.      END
  3103.  
  3104. SEE ALSO
  3105.      -/-
  3106.  
  3107. Function REXXTRICKSVERSION()
  3108. ****************************
  3109.  
  3110. NAME
  3111.      version = REXXTRICKSVERSION()
  3112.  
  3113. ALIAS
  3114.      version = RXTR_REXXTRICKSVERSION()
  3115.  
  3116. DESCRIPTION
  3117.      Returns the version of 'rexxtricks.library'
  3118.  
  3119. ARGUMENTS
  3120.      -/-
  3121.  
  3122. RESULT
  3123.      version - The version in the following format: VERSION.REVISION
  3124.  
  3125. EXAMPLE
  3126.      /* Display the version of 'rexxtricks.library' */
  3127.      
  3128.      version = REXXTRICKSVERSION()
  3129.      SAY 'You are using rexxtricks.library version' version
  3130.  
  3131. SEE ALSO
  3132.      -/-
  3133.  
  3134. Function UUDECODE()
  3135. *******************
  3136.  
  3137. NAME
  3138.      boolean = UUDECODE(sourcefile,destdir,destfile)
  3139.  
  3140. ALIAS
  3141.      boolean = RXTR_UUDECODE(sourcefile,destdir,destfile)
  3142.  
  3143. DESCRIPTION
  3144.      Decodes an uuencoded file and saves the binary files in the specified
  3145.      destination directory.
  3146.  
  3147. ARGUMENTS
  3148.      sourcefile - Name of the file, that contains one or more uuencoded
  3149.                   binary files. All contained files will be decoded.
  3150.      
  3151.                   Also it is possible to decode multipart uuencoded files.
  3152.                   All parts must be in the same directory and must have the
  3153.                   following format (e.g. 3 parts):
  3154.      
  3155.                   Part 1 - name:     uufile.uaa
  3156.      
  3157.                            contents: begin 644 binary.lha
  3158.                                      ...
  3159.                                      include uufile.uab
  3160.      
  3161.                   Part 2 - name:     uufile.uab
  3162.      
  3163.                            contents: begin part b uufile.uab
  3164.                                      ...
  3165.                                      include uufile.uac
  3166.      
  3167.                   Part 3 - name:     uufile.uac
  3168.      
  3169.                            contents: begin part c uufile.uac
  3170.                                      ...
  3171.                                      end
  3172.      
  3173.                   To decode multipart uuencoded files of this format, simply
  3174.                   specify the filename of the first part at the 'filename'
  3175.                   argument. The decoding of all other parts is controlled by
  3176.                   the 'include' lines. It's very important that all parts
  3177.                   have the correct filename!
  3178.      
  3179.      destdir    - All decoded binary files are saved to this directory.
  3180.      
  3181.      destfile   - This argument is optional and should be used in special
  3182.                   cases only. If a filename is specified here, this name is
  3183.                   used for the first decoded binary file and the filename
  3184.                   specified at the 'begin' line in the sourcefile is then
  3185.                   ignored.
  3186.  
  3187. RESULT
  3188.      boolean    - 1 if successful, 0 for an error
  3189.      
  3190.                   Informations about the error are stored in the following
  3191.                   variables if UUDECODE() fails:
  3192.      
  3193.                   uuerror_number
  3194.      
  3195.                      This variable contains an error number:
  3196.                      --------------------------------------------
  3197.                      1 - cannot open a file
  3198.                      2 - incorrect or missing include-file
  3199.                      3 - 'begin' line not found
  3200.                      4 - incorrect checksum of a line
  3201.                      5 - error reading from a file
  3202.                      6 - error writing to a file
  3203.                      7 - incorrect size of the decoded binary file
  3204.                      8 - unexpected end of the sourcefile
  3205.      
  3206.                   uuerror_text
  3207.      
  3208.                      This variable contains an error message.
  3209.      
  3210.                   uuerror_file
  3211.      
  3212.                      This variable contains the name of the file, in
  3213.                      which the error has occured.
  3214.      
  3215.                   uuerror_line
  3216.      
  3217.                      On error 4, this variable contains the number
  3218.                      of the line with the incorrect checksum. On all
  3219.                      other errors, this variable is set to 0.
  3220.      
  3221.                   uuerror_size
  3222.      
  3223.                      On error 7, this variable contains the expected
  3224.                      size of the decoded binary file. On all other
  3225.                      errors, this variable is set to 0.
  3226.  
  3227. EXAMPLE
  3228.      /* uudecode the file 'DH0:Test.uaa' to 'RAM:' */
  3229.      
  3230.      IF UUDECODE('DH0:Test.uaa','RAM:') THEN
  3231.         SAY 'Decoding successful, all binary files saved!'
  3232.      ELSE
  3233.         SAY 'Error decoding file:' uuerror_text
  3234.  
  3235. SEE ALSO
  3236.      UUENCODE()
  3237.  
  3238. Function UUENCODE()
  3239. *******************
  3240.  
  3241. NAME
  3242.      boolean = UUENCODE(file,uufile,limit,suffix)
  3243.  
  3244. ALIAS
  3245.      boolean = RXTR_UUENCODE(file,uufile,limit,suffix)
  3246.  
  3247. DESCRIPTION
  3248.      Converts a binary file to pure ASCII so that it can be transmitted on
  3249.      a network which doesn't allow binary data.
  3250.  
  3251. ARGUMENTS
  3252.      file    - Name of the binary file to encode
  3253.      
  3254.      uufile  - Name of the uuencoded file. An existing suffix is replaced
  3255.                by '.uaa', '.uab', '.uac' etc., depending on the number of
  3256.                the created parts.
  3257.      
  3258.                The output format is similar to the format described in the
  3259.                chapter 'UUDECODE()'. See UUDECODE().
  3260.      
  3261.      limit   - The maximum size of a part in KB, allowed are 16, 32, 64,
  3262.                128, 256 and 512. 'limit' is optional, the binary file is
  3263.                encoded in one part if 'limit' is omitted.
  3264.      
  3265.      suffix  - With this switch you can specify that an existing suffix
  3266.                should not be replaced, '.uaa' etc. is appended in that
  3267.                case. Possible keywords are 'SUFFIX' or 'S'.
  3268.      
  3269.                If this argument is omitted, an existing suffix is replaced.
  3270.  
  3271. RESULT
  3272.      boolean - 1 if successful, 0 for an error
  3273.  
  3274. EXAMPLE
  3275.      /* Encode file 'DH0:Test.lha' to 'RAM:Test.uXX', */
  3276.      /* maximum size of a part is 64KB */
  3277.      
  3278.      IF UUENCODE('DH0:Test.lha','RAM:Test',64) THEN
  3279.         SAY 'Encoding of the file was successful!'
  3280.      ELSE
  3281.         SAY 'Error encoding file!'
  3282.  
  3283. SEE ALSO
  3284.      UUDECODE()
  3285.  
  3286. How to use the VIEWLIST() window
  3287. ********************************
  3288.  
  3289. Entries in the window:
  3290.      normal entry         - text color of the screen without background
  3291.      
  3292.      selected entry       - text color and fill color of the screen
  3293.      
  3294.      actual entry         - a frame is drawn around the entry
  3295.  
  3296. Gadgets:
  3297.      scroller             - scrolls the list up and down
  3298.      
  3299.      All                  - selects all entries
  3300.      
  3301.      Pattern              - selects all entries which are matching the
  3302.                             pattern in the string gadget
  3303.      
  3304.      Toggle               - toggles all entries
  3305.      
  3306.      None                 - deselects all entries
  3307.      
  3308.      Search               - searches the next entry which matches the
  3309.                             pattern in the string gadget
  3310.      
  3311.      string gadget        - AmigaDOS pattern to select or search for
  3312.                             entries
  3313.      
  3314.      Use                  - closes the window and returns all selected
  3315.                             entries
  3316.      
  3317.      Cancel               - cancels selection and closes the window
  3318.      
  3319.      close gadget         - cancels selection and closes the window
  3320.  
  3321. Mouse buttons:
  3322.      left button          - selects the entry under the pointer and
  3323.                             deselects all other entries
  3324.      
  3325.      shift left button    - toggles the entry under the pointer
  3326.      
  3327.      doubleclick          - closes the window and returns all selected
  3328.                             entries
  3329.  
  3330. Keyboard:
  3331.      cursor up/down       - moves the actual entry up and down
  3332.      
  3333.      shift cursor up/down - moves the actual entry one page up and down
  3334.      
  3335.      ctrl cursor up/down  - moves the actual entry to start or end of
  3336.                             the list
  3337.      
  3338.      return, enter, space - selects or deselects the actual entry
  3339.      
  3340.      tab                  - activates the string gadget
  3341.      
  3342.      esc                  - cancels selection and closes the window, same
  3343.                             as close gadget
  3344.  
  3345. Index
  3346. *****
  3347.  
  3348.  
  3349.  
  3350.  Addresses                              Author
  3351.  Append a filename to the end of a path MAKEPATH()
  3352.  Append a suffix to the end of a filenameMAKESUFFIX()
  3353.  Author                                 Author
  3354.  BEEP()                                 BEEP()
  3355.  Bildschirm blitzen                     BEEP()
  3356.  Bring a public screen to the front     PUBSCREENTOFRONT()
  3357.  BSEARCH()                              BSEARCH()
  3358.  Calculate 32-Bit CRC checksum of a fileCRC32()
  3359.  Call the icon information window from workbench (OS3.0+)WBINFO()
  3360.  Check for a pattern match with a stringMATCHPATTERN()
  3361.  Copy elements of a compound variable   STEMCOPY()
  3362.  Copyright                              Copyright
  3363.  Copyright notice                       Copyright
  3364.  Count chars in a string                COUNTCHARS()
  3365.  COUNTCHARS()                           COUNTCHARS()
  3366.  CRC32()                                CRC32()
  3367.  CRC32()                                CRC32()
  3368.  Create a new Icon                      CREATEICON()
  3369.  CREATEICON()                           CREATEICON()
  3370.  Credits                                Credits
  3371.  Display list in a listview window      VIEWLIST()
  3372.  Extract dirname from path              PATHPART()
  3373.  Extract filename from path             FILEPART()
  3374.  FILEID_GETHIGHID()                     FILEID_GETHIGHID()
  3375.  FILEID_GETIDSTRING()                   FILEID_GETIDSTRING()
  3376.  FILEID_GETTYPES()                      FILEID_GETTYPES()
  3377.  FILEID_IDENTIFY()                      FILEID_IDENTIFY()
  3378.  FILEPART()                             FILEPART()
  3379.  Function BEEP()                        BEEP()
  3380.  Function BSEARCH()                     BSEARCH()
  3381.  Function COUNTCHARS()                  COUNTCHARS()
  3382.  Function CRC32()                       CRC32()
  3383.  Function CREATEICON()                  CREATEICON()
  3384.  Function FILEID_GETHIGHID()            FILEID_GETHIGHID()
  3385.  Function FILEID_GETIDSTRING()          FILEID_GETIDSTRING()
  3386.  Function FILEID_GETTYPES()             FILEID_GETTYPES()
  3387.  Function FILEID_IDENTIFY()             FILEID_IDENTIFY()
  3388.  Function FILEPART()                    FILEPART()
  3389.  Function GETCOMMENT()                  GETCOMMENT()
  3390.  Function GETDEFAULTPUBSCREEN()         GETDEFAULTPUBSCREEN()
  3391.  Function GETDEFAULTTOOL()              GETDEFAULTTOOL()
  3392.  Function GETDIR()                      GETDIR()
  3393.  Function GETENV()                      GETENV()
  3394.  Function GETKEY()                      GETKEY()
  3395.  Function GETPROTECTION()               GETPROTECTION()
  3396.  Function GETPUBSCREENMODES()           GETPUBSCREENMODES()
  3397.  Function GETSTACK()                    GETSTACK()
  3398.  Function GETTOOLTYPES()                GETTOOLTYPES()
  3399.  Function GETTOOLTYPEVALUE()            GETTOOLTYPEVALUE()
  3400.  Function LSEARCH()                     LSEARCH()
  3401.  Function MAKEPATH()                    MAKEPATH()
  3402.  Function MAKESUFFIX()                  MAKESUFFIX()
  3403.  Function MATCHPATTERN()                MATCHPATTERN()
  3404.  Function PATHPART()                    PATHPART()
  3405.  Function PUBSCREENLIST()               PUBSCREENLIST()
  3406.  Function PUBSCREENTOBACK()             PUBSCREENTOBACK()
  3407.  Function PUBSCREENTOFRONT()            PUBSCREENTOFRONT()
  3408.  Function QSORT()                       QSORT()
  3409.  Function RAND()                        RAND()
  3410.  Function READCLIPBOARD()               READCLIPBOARD()
  3411.  Function READFILE()                    READFILE()
  3412.  Function READLINES()                   READLINES()
  3413.  Function REXXTRICKSVERSION()           REXXTRICKSVERSION()
  3414.  Function SCSI_DEVICETYPE()             SCSI_DEVICETYPE()
  3415.  Function SCSI_MANUFACTURER()           SCSI_MANUFACTURER()
  3416.  Function SCSI_PRODUCT()                SCSI_PRODUCT()
  3417.  Function SCSI_REVISION()               SCSI_REVISION()
  3418.  Function SCSI_TESTREADY()              SCSI_TESTREADY()
  3419.  Function SEARCHPATTERN()               SEARCHPATTERN()
  3420.  Function SETCOMMENT()                  SETCOMMENT()
  3421.  Function SETDEFAULTPUBSCREEN()         SETDEFAULTPUBSCREEN()
  3422.  Function SETDEFAULTTOOL()              SETDEFAULTTOOL()
  3423.  Function SETENV()                      SETENV()
  3424.  Function SETPROTECTION()               SETPROTECTION()
  3425.  Function SETPUBSCREENMODES()           SETPUBSCREENMODES()
  3426.  Function SETSTACK()                    SETSTACK()
  3427.  Function SETTOOLTYPES()                SETTOOLTYPES()
  3428.  Function SETTOOLTYPEVALUE()            SETTOOLTYPEVALUE()
  3429.  Function STEMCOPY()                    STEMCOPY()
  3430.  Function STEMINSERT()                  STEMINSERT()
  3431.  Function STEMREMOVE()                  STEMREMOVE()
  3432.  Function SUFFIXPART()                  SUFFIXPART()
  3433.  Function UNSETENV()                    UNSETENV()
  3434.  Function UUDECODE()                    UUDECODE()
  3435.  Function UUENCODE()                    UUENCODE()
  3436.  Function VIEWLIST()                    VIEWLIST()
  3437.  Function WBINFO()                      WBINFO()
  3438.  Function WHATIS()                      WHATIS()
  3439.  Function WHATISTYPES()                 WHATISTYPES()
  3440.  Function WRITECLIPBOARD()              WRITECLIPBOARD()
  3441.  Function WRITEFILE()                   WRITEFILE()
  3442.  Function WRITELINES()                  WRITELINES()
  3443.  Functions                              Library functions
  3444.  Get a list of all 'FileID.library' filetypesFILEID_GETTYPES()
  3445.  Get a list of all 'whatis.library' filetypesWHATISTYPES()
  3446.  Get a random number                    RAND()
  3447.  Get all tooltypes of an icon           GETTOOLTYPES()
  3448.  Get comment of a file                  GETCOMMENT()
  3449.  Get current public screen modes        GETPUBSCREENMODES()
  3450.  Get default tool of an icon            GETDEFAULTTOOL()
  3451.  Get environment variable               GETENV()
  3452.  Get list of all public screens currently openPUBSCREENLIST()
  3453.  Get maximum filetype ID of 'FileID.library'FILEID_GETHIGHID()
  3454.  Get name of the default public screen  GETDEFAULTPUBSCREEN()
  3455.  Get protection flags of a file         GETPROTECTION()
  3456.  Get the description of a filtype ID    FILEID_GETIDSTRING()
  3457.  Get the manufacturer of a SCSI peripheralSCSI_MANUFACTURER()
  3458.  Get the product string of a SCSI peripheralSCSI_PRODUCT()
  3459.  Get the revision string of a SCSI peripheralSCSI_REVISION()
  3460.  Get the stacksize of an icon           GETSTACK()
  3461.  Get the suffix of a filename           SUFFIXPART()
  3462.  Get the type of a SCSI peripheral, DISK, TAPE etc.SCSI_DEVICETYPE()
  3463.  Get the value of a tooltype            GETTOOLTYPEVALUE()
  3464.  Get version of rexxtricks.library      REXXTRICKSVERSION()
  3465.  GETCOMMENT()                           GETCOMMENT()
  3466.  GETDEFAULTPUBSCREEN()                  GETDEFAULTPUBSCREEN()
  3467.  GETDEFAULTPUBSCREEN()                  GETDEFAULTPUBSCREEN()
  3468.  GETDEFAULTTOOL()                       GETDEFAULTTOOL()
  3469.  GETDIR()                               GETDIR()
  3470.  GETENV()                               GETENV()
  3471.  GETKEY()                               GETKEY()
  3472.  GETPROTECTION()                        GETPROTECTION()
  3473.  GETPUBSCREENMODES()                    GETPUBSCREENMODES()
  3474.  GETPUBSCREENMODES()                    GETPUBSCREENMODES()
  3475.  GETSTACK()                             GETSTACK()
  3476.  GETTOOLTYPES()                         GETTOOLTYPES()
  3477.  GETTOOLTYPEVALUE()                     GETTOOLTYPEVALUE()
  3478.  History                                History
  3479.  How to use the VIEWLIST() window       The VIEWLIST() window
  3480.  Index                                  Index
  3481.  Insert elements in a compound variable STEMINSERT()
  3482.  Installation                           Installation
  3483.  Keyboard shortcuts                     The VIEWLIST() window
  3484.  Library functions                      Library functions
  3485.  LSEARCH()                              LSEARCH()
  3486.  MAKEPATH()                             MAKEPATH()
  3487.  MAKESUFFIX()                           MAKESUFFIX()
  3488.  MATCHPATTERN()                         MATCHPATTERN()
  3489.  PATHPART()                             PATHPART()
  3490.  PUBSCREENLIST()                        PUBSCREENLIST()
  3491.  PUBSCREENLIST()                        PUBSCREENLIST()
  3492.  PUBSCREENTOBACK()                      PUBSCREENTOBACK()
  3493.  PUBSCREENTOBACK()                      PUBSCREENTOBACK()
  3494.  PUBSCREENTOFRONT()                     PUBSCREENTOFRONT()
  3495.  PUBSCREENTOFRONT()                     PUBSCREENTOFRONT()
  3496.  QSORT()                                QSORT()
  3497.  RAND()                                 RAND()
  3498.  Read a part of a textfile into a compound variableREADLINES()
  3499.  Read a textfile into a compound variableREADFILE()
  3500.  Read directory into a compound variableGETDIR()
  3501.  Read text from clipboard               READCLIPBOARD()
  3502.  READCLIPBOARD()                        READCLIPBOARD()
  3503.  READFILE()                             READFILE()
  3504.  READLINES()                            READLINES()
  3505.  Recognize the type of a file using 'FileID.library'FILEID_IDENTIFY()
  3506.  Recognize the type of a file using 'whatis.library'WHATIS()
  3507.  Remove elements of a compound variable STEMREMOVE()
  3508.  Remove environment variable            UNSETENV()
  3509.  Replace or insert lines in a textfile  WRITELINES()
  3510.  Requirements                           Requirements
  3511.  REXXTRICKSVERSION()                    REXXTRICKSVERSION()
  3512.  SCSI_DEVICETYPE()                      SCSI_DEVICETYPE()
  3513.  SCSI_MANUFACTURER()                    SCSI_MANUFACTURER()
  3514.  SCSI_PRODUCT()                         SCSI_PRODUCT()
  3515.  SCSI_REVISION()                        SCSI_REVISION()
  3516.  SCSI_TESTREADY()                       SCSI_TESTREADY()
  3517.  Search for pattern in a textfile       SEARCHPATTERN()
  3518.  Search string with Binary Search       BSEARCH()
  3519.  Search string with Linear Search       LSEARCH()
  3520.  SEARCHPATTERN()                        SEARCHPATTERN()
  3521.  Send a public screen to the back       PUBSCREENTOBACK()
  3522.  Set all tooltypes of an icon           SETTOOLTYPES()
  3523.  Set comment on a file                  SETCOMMENT()
  3524.  Set default tool of an icon            SETDEFAULTTOOL()
  3525.  Set environment variable               SETENV()
  3526.  Set new default public screen          SETDEFAULTPUBSCREEN()
  3527.  Set new public screen modes            SETPUBSCREENMODES()
  3528.  Set protection flags of a file         SETPROTECTION()
  3529.  Set the stacksize of an icon           SETSTACK()
  3530.  Set the value of a tooltype            SETTOOLTYPEVALUE()
  3531.  SETCOMMENT()                           SETCOMMENT()
  3532.  SETDEFAULTPUBSCREEN()                  SETDEFAULTPUBSCREEN()
  3533.  SETDEFAULTPUBSCREEN()                  SETDEFAULTPUBSCREEN()
  3534.  SETDEFAULTTOOL()                       SETDEFAULTTOOL()
  3535.  SETENV()                               SETENV()
  3536.  SETPROTECTION()                        SETPROTECTION()
  3537.  SETPUBSCREENMODES()                    SETPUBSCREENMODES()
  3538.  SETPUBSCREENMODES()                    SETPUBSCREENMODES()
  3539.  SETSTACK()                             SETSTACK()
  3540.  SETTOOLTYPES()                         SETTOOLTYPES()
  3541.  SETTOOLTYPEVALUE()                     SETTOOLTYPEVALUE()
  3542.  Sort list with QuickSort               QSORT()
  3543.  STEMCOPY()                             STEMCOPY()
  3544.  STEMINSERT()                           STEMINSERT()
  3545.  STEMREMOVE()                           STEMREMOVE()
  3546.  SUFFIXPART()                           SUFFIXPART()
  3547.  Support-Mailbox                        Author
  3548.  Test whether a SCSI peripheral is ready or notSCSI_TESTREADY()
  3549.  The VIEWLIST() window                  The VIEWLIST() window
  3550.  UNSETENV()                             UNSETENV()
  3551.  uudecode a file                        UUDECODE()
  3552.  UUDECODE()                             UUDECODE()
  3553.  uuencode a file                        UUENCODE()
  3554.  UUENCODE()                             UUENCODE()
  3555.  VIEWLIST()                             VIEWLIST()
  3556.  Wait for a key at console window       GETKEY()
  3557.  WBINFO()                               WBINFO()
  3558.  WHATIS()                               WHATIS()
  3559.  WHATISTYPES()                          WHATISTYPES()
  3560.  WHATISTYPES()                          WHATISTYPES()
  3561.  Write contents of a compound variable to a textfileWRITEFILE()
  3562.  Write text to clipboard                WRITECLIPBOARD()
  3563.  WRITECLIPBOARD()                       WRITECLIPBOARD()
  3564.  WRITEFILE()                            WRITEFILE()
  3565.  WRITELINES()                           WRITELINES()
  3566.  
  3567.